[solved] escape:html leaves attributes in img alt

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
yannkee
Forum Members
Forum Members
Posts: 14
Joined: Thu Apr 17, 2008 6:37 pm

[solved] escape:html leaves attributes in img alt

Post 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 ~~~~~
Last edited by yannkee on Wed Apr 21, 2010 5:37 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: escape:html leaves attributes in img alt

Post by Rolf »

Hi yannkee,

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

Regards, Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
yannkee
Forum Members
Forum Members
Posts: 14
Joined: Thu Apr 17, 2008 6:37 pm

Re: escape:html leaves attributes in img alt

Post by yannkee »

WONDERFULL !!!

Many many thanks Rolf !
Post Reply

Return to “CMSMS Core”