diff options
Diffstat (limited to 'webkit/port/page/inspector/utilities.js')
| -rw-r--r-- | webkit/port/page/inspector/utilities.js | 12 |
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, "&").replace(/</g, "<").replace(/>/g, ">"); + return this.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\"/g, """).replace(/\'/g, "'"); } 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\"><!DOCTYPE " + this.nodeName; + info.title = "<span class=\"webkit-html-doctype\"><!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 += "></span>"; break; default: |
