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

Unified Diff: Source/core/page/PagePopupClient.cpp

Issue 1151153004: Can't open <select> popup with an <option> text including "</script>". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 | « Source/core/core.gypi ('k') | Source/core/page/PagePopupClientTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PagePopupClient.cpp
diff --git a/Source/core/page/PagePopupClient.cpp b/Source/core/page/PagePopupClient.cpp
index 68ba3e91cd07df2edd39cfb857051de8a6025381..ddd4e8401bc4f3491a96d1588a2ac1d5d1b1c383 100644
--- a/Source/core/page/PagePopupClient.cpp
+++ b/Source/core/page/PagePopupClient.cpp
@@ -50,6 +50,10 @@ void PagePopupClient::addJavaScriptString(const String& str, SharedBuffer* data)
} else if (str[i] == '\\' || str[i] == '"') {
builder.append('\\');
builder.append(str[i]);
+ } else if (str[i] == '<') {
+ // Need to avoid to add "</script>" because the resultant string is
+ // typically embedded in <script>.
+ builder.append("\\x3C");
} else {
builder.append(str[i]);
}
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/page/PagePopupClientTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698