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.
Dear,
I tried to use the module on an html string, but it seems that it remove any html tag.
My test was to use it on a body content.
the result string was empty from any html tags ans attributes.
How could I do to use it on an html content ?
regards
Comments
Comment #2
geek-merlinThe module is just a wrapper around the preg_replace function.
You can debug your regular expressions with something like this:
https://de.functions-online.com/preg_replace.html
To get help with further regex questions, consider here:
http://stackoverflow.com/
Comment #3
superlolo95 CreditAttribution: superlolo95 commentedDear,
I used the same pattern in my rule with a php action ("Execute custom PHP code") that is like below (without the php delimiters):
In the php action, this is working well. Html tags and attributes are kept.
With the module, with the same pattern, the html tags are removed. Only the text remains.
Note:
My rules is supposed to remove html style attributes from the body value before saving for a specific node type.
Regards