dynamic_image_size.rb 277 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class HtmlSanitizer
  3. class DynamicImageSize
  4. def sanitize(string)
  5. Loofah
  6. .fragment(string)
  7. .scrub!(HtmlSanitizer::Scrubber::ImageSize.new)
  8. .to_html
  9. end
  10. end
  11. end