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

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2531163004: Remove attributes that contain javascript from MHTML (Closed)
Patch Set: Created 4 years, 1 month 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/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 047e339cba3e817a5c7eb056291cb3d2776f7584..dcf5dcc29ac7770c125c97181fc21d2959d3b9b7 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1430,16 +1430,6 @@ bool Element::shouldInvalidateDistributionWhenAttributeChanged(
return featureSet.hasSelectorForAttribute(name.localName());
}
-// Returns true is the given attribute is an event handler.
-// We consider an event handler any attribute that begins with "on".
-// It is a simple solution that has the advantage of not requiring any
-// code or configuration change if a new event handler is defined.
-
-static inline bool isEventHandlerAttribute(const Attribute& attribute) {
- return attribute.name().namespaceURI().isNull() &&
- attribute.name().localName().startsWith("on");
-}
-
bool Element::attributeValueIsJavaScriptURL(const Attribute& attribute) {
return protocolIsJavaScript(
stripLeadingAndTrailingHTMLSpaces(attribute.value()));

Powered by Google App Engine
This is Rietveld 408576698