You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application written in C++ that runs a ExecuteJavaScript for a JS funciton of mine that returns a string.
If there is a '<' inside the response, in the C++ side, it will be replaced by \u003C. The problem is, that it seems to happen only (as far as I observed) to this and not to the other HTML symbols (>, &, ...) and even other weird UTF symbols are captured correctly in the C++ side.
Is there something that I'm missing here? So far I'm not sure if it is a encoding problem, because this just happens to this specific symbol.
Thank you!
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
120.0.2210.133
SDK Version
No response
Framework
Win32
Operating System
Windows 10
OS Version
19045.3930
Repro steps
Create a JS method that returns a string containing a "<" symbol.
Call this method with ExecuteJavaScript().
The Callback will have the response showing "\u003C" in place of the "<". (Other symbols are not affected)
Repros in Edge Browser
Not Applicable
Regression
No, this never worked
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered:
If you use ExecuteScriptAsync and examine the result string, that result string is the JSON encoded result of script execution. If script execution returns a string, then the ExecuteScriptAsync result is the JSON encoded string. That means it has starting and ending quotes, special characters will be slash escaped, and it looks like the '<' will also be encoded. If you JSON decode the result you should get the string you expect.
What happened?
I have an application written in C++ that runs a ExecuteJavaScript for a JS funciton of mine that returns a string.
If there is a '<' inside the response, in the C++ side, it will be replaced by \u003C. The problem is, that it seems to happen only (as far as I observed) to this and not to the other HTML symbols (>, &, ...) and even other weird UTF symbols are captured correctly in the C++ side.
Is there something that I'm missing here? So far I'm not sure if it is a encoding problem, because this just happens to this specific symbol.
Thank you!
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
120.0.2210.133
SDK Version
No response
Framework
Win32
Operating System
Windows 10
OS Version
19045.3930
Repro steps
Create a JS method that returns a string containing a "<" symbol.
Call this method with ExecuteJavaScript().
The Callback will have the response showing "\u003C" in place of the "<". (Other symbols are not affected)
Repros in Edge Browser
Not Applicable
Regression
No, this never worked
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: