Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Need to adjust the regex or do something slightly different.
Comment | File | Size | Author |
---|---|---|---|
#2 | advagg-2454239-1-skip-textarea-inline-wrapper.patch | 6.81 KB | mikeytown2 |
Comments
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedEnded up using DOMDocument's loadHTML along with DOMXPath's query with this selector
'//script[not(@src)][not(ancestor::textarea)]'
to do what I needed. Downside to this is it will rewrite malformed html into correct html; thus it alters more than the parts I want to alter. Because of this it is not enabled by default and can be turned on if so desired.