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

Unified Diff: third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp

Issue 2531163004: Remove attributes that contain javascript from MHTML (Closed)
Patch Set: Address final feedback Created 4 years 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
Index: third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp
diff --git a/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp b/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp
index 0666a7157737040a49ad7caebd902affcf1c4273..d929123c91275890cbff6f59c3648ea60038f42f 100644
--- a/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp
+++ b/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp
@@ -111,7 +111,8 @@ void MarkupAccumulator::appendText(StringBuilder& result, Text& text) {
m_formatter.appendText(result, text);
}
-bool MarkupAccumulator::shouldIgnoreAttribute(const Attribute& attribute) {
+bool MarkupAccumulator::shouldIgnoreAttribute(const Element& element,
+ const Attribute& attribute) {
return false;
}
@@ -122,7 +123,7 @@ void MarkupAccumulator::appendElement(StringBuilder& result,
AttributeCollection attributes = element.attributes();
for (const auto& attribute : attributes) {
- if (!shouldIgnoreAttribute(attribute))
+ if (!shouldIgnoreAttribute(element, attribute))
appendAttribute(result, element, attribute, namespaces);
}

Powered by Google App Engine
This is Rietveld 408576698