Title: [135723] trunk
- Revision
- 135723
- Author
- [email protected]
- Date
- 2012-11-26 07:46:41 -0800 (Mon, 26 Nov 2012)
Log Message
Web Inspector: URLs containing '^' are improperly linked in console messages.
https://bugs.webkit.org/show_bug.cgi?id=103248
Reviewed by Yury Semikhatsky.
Source/WebCore:
This patch adds '^' to WebInspector's regex of acceptable characters for
URLs that it knows how to display.
Test: http/tests/inspector/network/script-as-text-loading-with-caret.html
* inspector/front-end/ResourceUtils.js:
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
LayoutTests:
* http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt: Added.
* http/tests/inspector/network/script-as-text-loading-with-caret.html: Added.
* platform/chromium/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt:
JSC vs V8. :(
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (135722 => 135723)
--- trunk/LayoutTests/ChangeLog 2012-11-26 15:42:01 UTC (rev 135722)
+++ trunk/LayoutTests/ChangeLog 2012-11-26 15:46:41 UTC (rev 135723)
@@ -1,3 +1,15 @@
+2012-11-26 Mike West <[email protected]>
+
+ Web Inspector: URLs containing '^' are improperly linked in console messages.
+ https://bugs.webkit.org/show_bug.cgi?id=103248
+
+ Reviewed by Yury Semikhatsky.
+
+ * http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt: Added.
+ * http/tests/inspector/network/script-as-text-loading-with-caret.html: Added.
+ * platform/chromium/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt:
+ JSC vs V8. :(
+
2012-11-26 Robert Kroeger <[email protected]>
Unreviewd Gardening: updated TestExpecations for additional failures in
Added: trunk/LayoutTests/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt (0 => 135723)
--- trunk/LayoutTests/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt 2012-11-26 15:46:41 UTC (rev 135723)
@@ -0,0 +1,5 @@
+Tests console message when script is loaded with incorrect text/html mime type and the URL contains the '^' character.
+
+Bug 103248
+Resource interpreted as Script but transferred with MIME type text/plain: "http://127.0.0.1:8000/inspector/network/resources/script-as-text.php?this-i…-with^carats^like^these^because^who^doesnt^love^strange^characters^in^urls". [native code]:1
+
Added: trunk/LayoutTests/http/tests/inspector/network/script-as-text-loading-with-caret.html (0 => 135723)
--- trunk/LayoutTests/http/tests/inspector/network/script-as-text-loading-with-caret.html (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/network/script-as-text-loading-with-caret.html 2012-11-26 15:46:41 UTC (rev 135723)
@@ -0,0 +1,31 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+function loadScript()
+{
+ var s = document.createElement("script");
+ s.src = ""
+ document.body.appendChild(s);
+}
+
+function test()
+{
+ InspectorTest.addConsoleSniffer(step1);
+ InspectorTest.evaluateInPage("loadScript()");
+
+ function step1()
+ {
+ InspectorTest.dumpConsoleMessages();
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<p>Tests console message when script is loaded with incorrect text/html mime
+type and the URL contains the '^' character.</p>
+<a href="" 103248</a>
+</body>
+</html>
Added: trunk/LayoutTests/platform/chromium/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt (0 => 135723)
--- trunk/LayoutTests/platform/chromium/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt 2012-11-26 15:46:41 UTC (rev 135723)
@@ -0,0 +1,5 @@
+Tests console message when script is loaded with incorrect text/html mime type and the URL contains the '^' character.
+
+Bug 103248
+Resource interpreted as Script but transferred with MIME type text/plain: "http://127.0.0.1:8000/inspector/network/resources/script-as-text.php?this-i…-with^carats^like^these^because^who^doesnt^love^strange^characters^in^urls". script-as-text-loading-with-caret.html:10
+
Modified: trunk/Source/WebCore/ChangeLog (135722 => 135723)
--- trunk/Source/WebCore/ChangeLog 2012-11-26 15:42:01 UTC (rev 135722)
+++ trunk/Source/WebCore/ChangeLog 2012-11-26 15:46:41 UTC (rev 135723)
@@ -1,3 +1,18 @@
+2012-11-26 Mike West <[email protected]>
+
+ Web Inspector: URLs containing '^' are improperly linked in console messages.
+ https://bugs.webkit.org/show_bug.cgi?id=103248
+
+ Reviewed by Yury Semikhatsky.
+
+ This patch adds '^' to WebInspector's regex of acceptable characters for
+ URLs that it knows how to display.
+
+ Test: http/tests/inspector/network/script-as-text-loading-with-caret.html
+
+ * inspector/front-end/ResourceUtils.js:
+ (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
+
2012-11-26 Yury Semikhatsky <[email protected]>
Unreviewed. Fix Qt minimal compilation after r135713.
Modified: trunk/Source/WebCore/inspector/front-end/ResourceUtils.js (135722 => 135723)
--- trunk/Source/WebCore/inspector/front-end/ResourceUtils.js 2012-11-26 15:42:01 UTC (rev 135722)
+++ trunk/Source/WebCore/inspector/front-end/ResourceUtils.js 2012-11-26 15:46:41 UTC (rev 135723)
@@ -85,7 +85,7 @@
WebInspector.linkifyStringAsFragmentWithCustomLinkifier = function(string, linkifier)
{
var container = document.createDocumentFragment();
- var linkStringRegEx = /(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\/\/|data:|www\.)[\w$\-_+*'=\|\/\\(){}[\]%@&#~,:;.!?]{2,}[\w$\-_+*=\|\/\\({%@&#~]/;
+ var linkStringRegEx = /(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\/\/|data:|www\.)[\w$\-_+*'=\|\/\\(){}[\]^%@&#~,:;.!?]{2,}[\w$\-_+*=\|\/\\({^%@&#~]/;
var lineColumnRegEx = /:(\d+)(:(\d+))?$/;
while (string) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes