-
eric@webkit.org authored
Reviewed by Darin Adler. Escape control characters in CSS string value when it is serialilzed. When WebKit serializes a CSS string value that contains binary characters ('\0\1\2' for example), it did not escape these characters. As a result, users got (invisible) control characters through scripts. This change fixes this issue. As a side effect, two separate codes for escaping CSS strings are merged, and become a public function (quoteCSSString). CSS string value is not correctly serialized when it contains binary characters https://bugs.webkit.org/show_bug.cgi?id=28938 * fast/css/script-tests/string-quote-binary.js: Added. * fast/css/string-quote-binary-expected.txt: Added. * fast/css/string-quote-binary.html: Added. * fast/js/resources/js-test-pre.js: (shouldBeEqualToString): Considering the case when the argument contains binary characters. 2010-04-05 Yuta Kitamura <yutak@chromium.org> Reviewed by Darin Adler. Escape control characters in CSS string value when it is serialilzed. When WebKit serializes a CSS string value that contains binary characters ('\0\1\2' for example), it did not escape these characters. As a result, users got (invisible) control characters through scripts. This change fixes this issue. As a side effect, two separate codes for escaping CSS strings are merged, and become a public function (quoteCSSString). CSS string value is not correctly serialized when it contains binary characters https://bugs.webkit.org/show_bug.cgi?id=28938 Test: fast/css/string-quote-binary.html * css/CSSParser.cpp: (WebCore::isCSSTokenizerIdentifier): (WebCore::isCSSTokenizerURL): (WebCore::quoteCSSString): (WebCore::quoteCSSStringIfNeeded): (WebCore::quoteCSSURLIfNeeded): * css/CSSParser.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): * css/FontFamilyValue.cpp: (WebCore::FontFamilyValue::cssText): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
eb651ee6