Skip to content

Commit 6e7a3d1

Browse files
authored
Merge f65913e into 3fe762c
2 parents 3fe762c + f65913e commit 6e7a3d1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

source/message.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<!doctype html>
32
<HTML style="width : 350; height: 300">
43
<HEAD>
@@ -15,7 +14,7 @@
1514
function windowOnLoad() {
1615
// #5875: string.prototype.split strips the tail when a limit is supplied,
1716
// so use a regexp instead.
18-
var args = window.dialogArguments.match(/^(.*?);([\s\S]*)$/);
17+
var args = window.dialogArguments.match(/^(.*?)__NVDA:split-here__([\s\S]*)$/);
1918
// args[0] is the whole string.
2019
if (args && args.length == 3){
2120
document.title= args[1];

source/ui.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def browseableMessage(message: str, title: Optional[str] = None, isHtml: bool =
8888
@param title: The title for the message.
8989
@param isHtml: Whether the message is html
9090
"""
91+
splitWith: str = "__NVDA:split-here__" # Unambiguous regex splitter for javascript in message.html, #14667
9192
if _isSecureDesktop():
9293
import wx # Late import to prevent circular dependency.
9394
wx.CallAfter(_warnBrowsableMessageNotAvailableOnSecureScreens, title)
@@ -103,7 +104,7 @@ def browseableMessage(message: str, title: Optional[str] = None, isHtml: bool =
103104
title = _("NVDA Message")
104105
if not isHtml:
105106
message = f"<pre>{escape(message)}</pre>"
106-
dialogString = f"{title};{message}"
107+
dialogString = f"{title}{splitWith}{message}"
107108
dialogArguements = automation.VARIANT( dialogString )
108109
gui.mainFrame.prePopup()
109110
windll.mshtml.ShowHTMLDialogEx(

0 commit comments

Comments
 (0)