Actions

Template

Striphtml

From NEC Retro

Revision as of 15:20, 1 January 2022 by Black Squirrel (talk | contribs) (Text replacement - "Category:NEC Retro templates" to "Category:Templates")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.