adjust_inline_image_size.rb 292 B

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