9 lines
205 B
Ruby
9 lines
205 B
Ruby
|
|
module PdfHelper
|
||
|
|
def prepare_rich_text(rich_text)
|
||
|
|
%w[div p del blockquote pre code].each do |tag|
|
||
|
|
rich_text = rich_text.to_s.gsub(%r{<#{tag}.*?>|</#{tag}>}, '')
|
||
|
|
end
|
||
|
|
rich_text
|
||
|
|
end
|
||
|
|
end
|