Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Unified Diff: src/string.js

Issue 446973004: Only escape U+0022 in argument values of `String.prototype` HTML methods (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/es6/string-html.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index 5cd1c0cfb71fc2edbe62b91960af7e2708ce0c43..ae65264d4a3ae2c29cc39add829dd45e51ccf0c3 100644
--- a/src/string.js
+++ b/src/string.js
@@ -829,10 +829,7 @@ function StringFromCharCode(code) {
// ES6 draft, revision 26 (2014-07-18), section B.2.3.2.1
function HtmlEscape(str) {
- return TO_STRING_INLINE(str).replace(/</g, "&lt;")
- .replace(/>/g, "&gt;")
- .replace(/"/g, "&quot;")
- .replace(/'/g, "&#039;");
+ return TO_STRING_INLINE(str).replace(/"/g, "&quot;");
}
« no previous file with comments | « no previous file | test/mjsunit/es6/string-html.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698