Page 1 of 1

[solved] escape:html leaves attributes in img alt

Posted: Wed Apr 21, 2010 3:31 pm
by yannkee
Hello,
Small problem, in album, using a simple template that calls alt and title attributes with picture comment.

The picture comment is two lines made (title and text ).

Code: Select all

<img src="{$onepicture->thumbnail}" 
alt="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}" 
title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}" 
/>
But the results is

Code: Select all

    <img src="picture01.gif" alt="picture01.gif - <h3> yoyoyoyo with H3 </h3>
    <p> yoyoyoyoyo. </p>" title="picture01.gif - <h3> yoyoyoyo with H3 </h3>
    <p> yoyoyoyoyo . </p>">
So I have yoyoyoyoyoyoyoyoyoyo</p in <img alt and title...

Yet seen ? Any idea ?

Thanks

   #~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~
   #~ Version du CMS : 1.6.7
   #~ Version du MLE si existante : 1.6.7
   #~ Informations Système :
   #~      Cms Version: 1.6.7
   #~      Installed Modules:
   #~          * CMSMailer: 1.73.14
   #~          * FileManager: 1.0.2
   #~          * MenuManager: 1.6.2
   #~          * ModuleManager: 1.3.2
   #~          * News: 2.10.4
   #~          * nuSOAP: 1.0.1
   #~          * Printing: 1.0.4
   #~          * Search: 1.6.1
   #~          * ThemeManager: 1.1.1
   #~          * TinyMCE: 2.6.2
   #~          * Album: 0.9.3
   #~~~~~ NE PAS SUPPRIMER CE BLOC ~~~~~

Re: escape:html leaves attributes in img alt

Posted: Wed Apr 21, 2010 5:26 pm
by Rolf
Hi yannkee,

And if you use this?
{$onepicture->name|strip_tags}

Regards, Rolf

Re: escape:html leaves attributes in img alt

Posted: Wed Apr 21, 2010 5:36 pm
by yannkee
WONDERFULL !!!

Many many thanks Rolf !