Project

General

Profile

« Previous | Next » 

Revision b43acfe3

Added by koszko over 1 year ago

fix setting of 'blocked-' attributes when blocking intrinsic event handlers

View differences:

content/policy_enforcing.js
213 213

  
214 214
#IF MOZILLA
215 215
function sanitize_element_onevent(element) {
216
    for (const attribute_node of (element.attributes || [])) {
216
    if (element.haketilo_sanitized_onevent)
217
	return;
218

  
219
    element.haketilo_sanitized_onevent = true;
220

  
221
    for (const attribute_node of [...(element.attributes || [])]) {
217 222
	const attr = attribute_node.localName, attr_lo = attr.toLowerCase();;
218 223
	if (!/^on/.test(attr_lo) || !(attr_lo in element.wrappedJSObject))
219 224
	    continue;

Also available in: Unified diff