Method: EditorJs::Blocks::QuoteBlock#sanitize!
- Defined in:
- lib/editor_js/blocks/quote_block.rb
#sanitize! ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/editor_js/blocks/quote_block.rb', line 45 def sanitize! %w[text caption].each do |key| data[key] = Sanitize.fragment( data[key], elements: .keys, attributes: .select { |_k, v| v }, remove_contents: false ) end data['alignment'] = Sanitize.fragment(data['alignment'], remove_contents: true) end |