Striphtml
From NEC Retro
Revision as of 14:20, 1 January 2022 by Black Squirrel (talk | contribs) (Text replacement - "Category:NEC Retro templates" to "Category:Templates")
Revision as of 14:20, 1 January 2022 by Black Squirrel (talk | contribs) (Text replacement - "Category:NEC Retro templates" to "Category:Templates")
Removes all HTML tags from a string, as well as the content between <div> tags if removediv=yes is set.
Example
{{striphtml|1=<i>Italics</i><div style="border:solid red 1px; background:green;">div content</div>This is <b>bold</b> text,<br>new line.|removediv=yes}}
returns:
Italics This is bold text, new line.
{{striphtml|1=<i>Italics</i><div style="border:solid red 1px; background:green;">div content</div>This is <b>bold</b> text,<br>new line.}}
returns:
Italics div content This is bold text, new line.