Don't replace \ with / in data: urls
http://bugs.webkit.org/show_bug.cgi?id=16692
Test: fast/loader/url-data-replace-backslash.html
* platform/KURL.cpp:
(WebCore::KURL::init):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29061
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-01-01 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Alexey.
+
+ Don't replace \ with / in data: urls
+ http://bugs.webkit.org/show_bug.cgi?id=16692
+
+ * fast/loader/url-data-replace-backslash-expected.txt: Added.
+ * fast/loader/url-data-replace-backslash.html: Added.
+
2007-12-31 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
--- /dev/null
+<script>
+var d5 = "fail";
+</script>
+<script type="text/javascript" src="data:text/javascript,d5%20%3D%20'five\u0027s'%3B"></script>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+if (d5 == "five's") {
+ document.write("PASS");
+} else {
+ document.write("FAIL: d5 was: " + d5 + " should have been : five's");
+}
+</script>
+2008-01-01 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Alexey.
+
+ Don't replace \ with / in data: urls
+ http://bugs.webkit.org/show_bug.cgi?id=16692
+
+ Test: fast/loader/url-data-replace-backslash.html
+
+ * platform/KURL.cpp:
+ (WebCore::KURL::init):
+
2008-01-01 Alp Toker <alp@atoker.com>
GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
// for compatibility with Win IE, we must treat backslashes as if they were slashes, as long as we're not dealing with the javascript: schema
DeprecatedString substitutedRelative;
- bool shouldSubstituteBackslashes = relative.contains('\\') && !relative.startsWith("javascript:", false);
- if (shouldSubstituteBackslashes) {
+ bool shouldSubstituteBackslashes = relative.contains('\\') && !(relative.startsWith("javascript:", false) || relative.startsWith("data:", false));
+ if (shouldSubstituteBackslashes)
substitutedRelative = substituteBackslashes(relative);
- }
const DeprecatedString &rel = shouldSubstituteBackslashes ? substitutedRelative : relative;