Skip to content

Commit

Permalink
Merge pull request #3046 from bitzesty/staging
Browse files Browse the repository at this point in the history
Production < staging
  • Loading branch information
TheDancingClown authored Aug 21, 2024
2 parents e43ceff + e01f771 commit c4865af
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions app/pdf_generators/qae_pdf_forms/custom_questions/textarea.rb
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,11 @@ def wysywyg_get_item_content(child, content = [])
end

def sanitize_content(content)
content = Nokogiri::HTML(content)
content.xpath("//@style")
.remove

content.children
.css("body")
.to_html
.gsub("<body>", "")
.gsub("</body>", "")
# Check if content is a standalone strong or em closing tag
if content.match?(%r{</(strong|em)>})
content
else
""
end
end
end

0 comments on commit c4865af

Please sign in to comment.