Sha256: f9990ae393211d935dadb9ca48126f75243895a72bec0790a67e21111d331025
Contents?: true
Size: 543 Bytes
Versions: 28
Compression:
Stored size: 543 Bytes
Contents
module Deface module Actions class RemoveFromAttributes < AttributeAction def execute_for_attribute(target_element, name, value) if target_element.attributes.key?(name) target_element.set_attribute(name, target_element.attributes[name].value.gsub(value.to_s, '').strip) elsif target_element.attributes.key?("data-erb-#{name}") target_element.set_attribute("data-erb-#{name}", target_element.attributes["data-erb-#{name}"].value.gsub(value.to_s, '').strip) end end end end end
Version data entries
28 entries across 28 versions & 2 rubygems