Closed brianrivet-tilt closed 1 year ago
Nevermind. Sorted it out myself. I didn't realize the order of the functions mattered. It works fine if the remove p tags line is last.
Hm, in this case the order shouldn't matter. I'm going to take a closer look at this when I have a chance.
I found the culprit here, and it had nothing to do with the order of operations per se. Turns out it was DOMDocument wrapping the text node (i.e. text content without a HTML tag) in a <p>
tag. A fix will be included in the next release!
Hi,
I'm sure this is a user error situation, but I'm trying to remove p tags and then add classes to the a tags in code. The class add is working, but the p tags are not being removed. Here's my code:
The field in question is a redactor field that only contains a p tag with a couple of links and
tags. Can you tell me what I'm doing wrong that would cause the p tags not to strip?
Thanks!