Skip to content
Permalink
Browse files
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):


Canonical link: https://commits.webkit.org/22900@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Jan 1, 2008
1 parent d83b9b2 commit 5c2f6e07ec030c1943ab5957a224fd798a027ff2
Showing 5 changed files with 38 additions and 3 deletions.
@@ -1,3 +1,13 @@
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.
@@ -0,0 +1 @@
PASS
@@ -0,0 +1,13 @@
<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>
@@ -1,3 +1,15 @@
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
@@ -285,10 +285,9 @@ void KURL::init(const KURL &base, const DeprecatedString &relative, const TextEn

// 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;

0 comments on commit 5c2f6e0

Please sign in to comment.