On occasion a <figure> tag will make it through WYGWAM with a <p> wrapped around it which breaks my layout (and is incorrect formatting anyway). Can I remove just the <p> tags that appear around specific elements? If so, how?

1 Answer 1


You can use the add-on Find and Replace Plus. http://devot-ee.com/add-ons/find-and-replace-plus

This should work for you.

  {replace_area find="<p><figure>" replace="<figure>"}
  {replace_area find="</figure></p>" replace="</figure>"}
    text you want processed
  • So this should work but it's not recognizing the white space between <p> and <figure> tags. In the HTML there is often whitespace and newlines between those tags. Tried this but it didn't work: {replace_area find="<p>:SPACE:<figure" replace="<figure"} Jul 26, 2013 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.