DescriptionMake sure string passed to sendMessageToEmbedder is a valid unicode string
The message passed to the method is a result of JSON.stringify and may contain noncharacter unicode code points (http://www.unicode.org/faq/private_use.html#noncharacters). Since we know that the message is a JSON string we can use \uXXXX escape sequences for bad symbols. The function escapes not only noncharacters which produces valid output and allows to keep implementation simple.
BUG=347899
R=pfeldman@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168448
Patch Set 1 #
Total comments: 2
Patch Set 2 : Comments addressed #Patch Set 3 : Do not escape whitespaces as they are allowed between tokens in JSON #Patch Set 4 : Rebase #
Total comments: 2
Messages
Total messages: 10 (0 generated)
|