-
darin@apple.com authored
Reviewed by Maciej. - fix http://bugs.webkit.org/show_bug.cgi?id=15814 <rdar://problem/5536644> fast/js/kde/encode_decode_uri.html fails These changes cause us to match the JavaScript specification and pass the fast/js/kde/encode_decode_uri.html test. * kjs/function.cpp: (KJS::encode): Call the UTF-8 string conversion in its new strict mode, throwing an exception if there are malformed UTF-16 surrogate pairs in the text. * kjs/ustring.h: Added a strict version of the UTF-8 string conversion. * kjs/ustring.cpp: (KJS::decodeUTF8Sequence): Removed code to disallow U+FFFE and U+FFFF; while those might be illegal in some sense, they aren't supposed to get any special handling in the place where this function is currently used. (KJS::UString::UTF8String): Added the strictness. LayoutTests: Reviewed by Maciej. - updates for http://bugs.webkit.org/show_bug.cgi?id=15814 <rdar://problem/5536644> fast/js/kde/encode_decode_uri.html fails * fast/js/kde/resources/encode_decode_uri.js: Rewrote the test to cover edges better, and use the should functions in a way that makes failures easier to understand. * fast/js/kde/encode_decode_uri-expected.txt: Updated. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
11f3b27e