Need to adjust the regex or do something slightly different.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

  • mikeytown2 committed da156c5 on 7.x-2.x
    Issue #2454239 by mikeytown2: Put a wrapper around inline JS needs to...
mikeytown2’s picture

Status: Active » Fixed
FileSize
6.81 KB

Ended 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.

  • mikeytown2 committed 48675c6 on 7.x-2.x
    Issue #2454239 by mikeytown2: Put a wrapper around inline JS needs to...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.