New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SVG] Escape non-ASCII characters in console messages #6402
Conversation
EWS run on previous version of this PR (hash 7fbe7c8) |
7fbe7c8
to
b1764d5
Compare
EWS run on previous version of this PR (hash b1764d5) |
b1764d5
to
efd2f54
Compare
EWS run on previous version of this PR (hash efd2f54) |
Source/WebCore/svg/SVGElement.cpp
Outdated
@@ -243,7 +244,7 @@ void SVGElement::reportAttributeParsingError(SVGParsingError error, const Qualif | |||
if (error == NoError) | |||
return; | |||
|
|||
String errorString = "<" + tagName() + "> attribute " + name.toString() + "=\"" + value + "\""; | |||
String errorString = "<" + tagName() + "> attribute " + name.toString() + "=" + JSON::Value::escapeString(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add this static function to JSON::Value
and it will make things compile:
String Value::escapeString(StringView string)
{
StringBuilder result;
escapeString(result, string);
return result.toString();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will reopen and push an update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried but it didn't work and then I tried to look into Chromium implementation and trying to see if it works but I think it would be difficult. My local build environment is also not working.
efd2f54
to
00e7ebe
Compare
EWS run on previous version of this PR (hash 00e7ebe)
|
EWS run on previous version of this PR (hash 00e7ebe)
|
00e7ebe
to
ed1fec9
Compare
EWS run on previous version of this PR (hash ed1fec9)
|
EWS run on previous version of this PR (hash ed1fec9)
|
ed1fec9
to
1300eee
Compare
EWS run on previous version of this PR (hash 1300eee)
|
EWS run on previous version of this PR (hash 1300eee)
|
1300eee
to
5199094
Compare
EWS run on previous version of this PR (hash 5199094)
|
EWS run on previous version of this PR (hash 5199094)
|
5199094
to
48f3dcc
Compare
EWS run on previous version of this PR (hash 48f3dcc)
|
EWS run on previous version of this PR (hash 48f3dcc)
|
48f3dcc
to
55ed06d
Compare
EWS run on previous version of this PR (hash 55ed06d)
|
EWS run on previous version of this PR (hash 55ed06d)
|
55ed06d
to
517f5dc
Compare
EWS run on previous version of this PR (hash 517f5dc)
|
EWS run on previous version of this PR (hash 517f5dc)
|
[SVG] Escape non-ASCII characters in console messages https://bugs.webkit.org/show_bug.cgi?id=247814 Reviewed by NOBODY (OOPS!). Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=196815 This is to align with Blink / Chrome behavior to allow escape non-ASCII characters in console messages. * Source/WebCore/svg/SVGElement.cpp: Add "JSONValues.h" header (SVGElement::reportAttributeParsingError): Update errorString to escape non-ASCII characters * Source/WTF/wtf/JSONValue.cpp: Add "quoteString" function * Source/WTF/wtf/JSONValues.h: Add definition for 'quoteString'
517f5dc
to
516f408
Compare
EWS run on current version of this PR (hash 516f408)
|
EWS run on current version of this PR (hash 516f408)
|
516f408