Part of the EllisLab Network

Plugin Information

HTML Strip 1.0.1 third_party

Download
Author:
Paul Burdick
Published:
Jul 12, 2004
Last Updated:
Mar 04, 2007
License:
Freeware
Categories:
Plugins  Text Formatting  
Strips out HTML code from text, even if the tags are converted into HTML entities

Example Usage

{exp:html_strip convert=’y’}

&lt;p&gt;text <strong>you</strong> want processed&lt;/p&gt;

{/exp:html_strip}

Notes

Strip out all HTML from a piece of text

{exp:html_strip}

text <strong>you</strong> want processed

{/exp:html_strip}

// Returns 'text you want processed'

----------------------------------------------

PARAMETERS


  • convert - Lets you specify whether to convert the HTML entities &lt; and &gt; back to the < and > characters before stripping out the HTML.


  • convert_back - Lets you specify whether to convert < and > back to the entities.

    • convert_back="all" will convert all < and > characters to entities.

    • convert_back="original" will convert the < and >'s that were originally &lt; and &gt; back to entities

    • convert_back="none" will convert none of the < and >'s back to entities


  • keep - Lets you specify what HTML tags to keep.


--------------------------

EXAMPLE:

{exp:html_strip convert="y" convert_back="all" keep="strong,em"}

&lt;p&gt;text &lt;strong&gt;you&lt;/strong&gt; want processed&lt;/p&gt;

{/exp:html_strip}

// Returns 'text &lt;strong&gt;you&lt;/strong&gt; want processed'