Reputation: 20538
I am building an Rails 5 app. In this app I am receiving html data from a WYSIWYG-form. In the content from the form I get a lot of empty
tags, how can I remove all these empty paragraph tags?
This is what I get:
<p></p>
Upvotes: 0
Views: 116
Reputation: 3139
If this is really the only thing you want to scrub:
content.gsub('<p></p>', '')
Upvotes: 1