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]); |
} |