Fix wxWebView::RunScript() with string containing backslashes
Escape backslashes in wxJSScriptWrapper to allow strings with backslashes in them to work again -- this was broken while implementing support for returning values from JavaScript to C++. See https://github.com/wxWidgets/wxWidgets/pull/741
This commit is contained in:
committed by
Vadim Zeitlin
parent
dd2d62c703
commit
3d427a1af1
@@ -38,7 +38,7 @@ public:
|
||||
|
||||
// Adds one escape level if there is a single quote, double quotes or
|
||||
// escape characters
|
||||
wxRegEx escapeDoubleQuotes("(\\\\*)(['\"\n\r\v\t\b\f])");
|
||||
wxRegEx escapeDoubleQuotes("(\\\\*)([\\'\"\n\r\v\t\b\f])");
|
||||
escapeDoubleQuotes.Replace(&m_escapedCode,"\\1\\1\\\\\\2");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user