|entites_html

  • New in : SPIP 1.4

The |entites_html filter is applied to a text tag and will translate the HTML rendition of that tag by transforming into HTML entities any constituent characters that do not belong to the page’s charset, as well as any ", < and >.
This is used to insert the text of a tag into a <textarea> </textarea> without causing any problems.

For example, if we start with a #DESCRIPTIF tag which returns the following HTML source: 2 is "greater" than 1 & is written as: 2 > 1,

<textarea>[(#DESCRIPTIF|entites_html)]</textarea>

would return the following HTML source:<textarea>2 is &quot;greater&quot; than 1 &amp; is written as: 2 &gt; 1</textarea>

Author Mark Published : Updated : 15/07/23

Translations : català, English, Español, français, Nederlands