The |texte_backend filter applied to a text tag will translate the HTML output of that tag into a format that is compatible with XML feeds.

  • New in : SPIP 1.4

It is used, for example in the backend.html template used to generate the RSS feeds for SPIP-published content.

This filter transforms links into absolute links, substitute in any available HTML entity codes, and escapes any HTML tags.

For example, a #DESCRIPTIF tag which normally returns the following HTML source:

<p><strong>William Shakespeare</strong> naquit à Stratford-sur-Avon, <span class='spip_document_164 spip_documents spip_documents_center' ><img src='IMG/png/maison-2.png' width="68" height="43" alt="" /></span> dans une maison sous les tuiles de laquelle était cachée...</p>

will now return, after the filter has been applied:

&lt;p&gt;&lt;strong&gt;William Shakespeare&lt;/strong&gt; naquit &#224; Stratford-sur-Avon, &lt;span class='spip_document_164 spip_documents spip_documents_center' &gt;
&lt;img src='http://www.domaine.tld/IMG/png/maison-2.png' width=&quot;68&quot; height=&quot;43&quot; alt=&quot;&quot; /&gt;&lt;/span&gt; dans une maison sous les tuiles de laquelle &#233;tait cach&#233;e...&lt;/p&gt;

See also

Author Mark Published : Updated : 21/07/23

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