summaryrefslogtreecommitdiffstats
path: root/webkit/port/page/inspector/utilities.js
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-10 22:00:02 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-10 22:00:02 +0000
commit2f668e22a495259d53772c6cc055547cd26cd7f1 (patch)
treeb45cb42f0061beb1ea2f3a0356f6a02c7b55ec0d /webkit/port/page/inspector/utilities.js
parentd9cb7a2518364bd3b61fb6fa3f7711b1027d0193 (diff)
downloadchromium_src-2f668e22a495259d53772c6cc055547cd26cd7f1.zip
chromium_src-2f668e22a495259d53772c6cc055547cd26cd7f1.tar.gz
chromium_src-2f668e22a495259d53772c6cc055547cd26cd7f1.tar.bz2
Fix escaping of hrefs on A tags in the inspector.
I will pursue making this change upstream as well, but as best I can tell, this function is dead code upstream and should just be deleted. Review URL: http://codereview.chromium.org/1880 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/page/inspector/utilities.js')
-rw-r--r--webkit/port/page/inspector/utilities.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/webkit/port/page/inspector/utilities.js b/webkit/port/page/inspector/utilities.js
index 5d295d4..9dcf71c 100644
--- a/webkit/port/page/inspector/utilities.js
+++ b/webkit/port/page/inspector/utilities.js
@@ -246,7 +246,7 @@ String.prototype.escapeForRegExp = function()
String.prototype.escapeHTML = function()
{
- return this.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+ return this.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\"/g, "&quot;").replace(/\'/g, "&#039;");
}
String.prototype.collapseWhitespace = function()
@@ -674,15 +674,15 @@ function nodeTitleInfo(hasChildren, linkify)
break;
case Node.DOCUMENT_TYPE_NODE:
- info.title = "<span class=\"webkit-html-doctype\">&lt;!DOCTYPE " + this.nodeName;
+ info.title = "<span class=\"webkit-html-doctype\">&lt;!DOCTYPE " + this.nodeName.escapeHTML();
if (this.publicId) {
- info.title += " PUBLIC \"" + this.publicId + "\"";
+ info.title += " PUBLIC \"" + this.publicId.escapeHTML() + "\"";
if (this.systemId)
- info.title += " \"" + this.systemId + "\"";
+ info.title += " \"" + this.systemId.escapeHTML() + "\"";
} else if (this.systemId)
- info.title += " SYSTEM \"" + this.systemId + "\"";
+ info.title += " SYSTEM \"" + this.systemId.escapeHTML() + "\"";
if (this.internalSubset)
- info.title += " [" + this.internalSubset + "]";
+ info.title += " [" + this.internalSubset.escapeHTML() + "]";
info.title += "&gt;</span>";
break;
default: