I have the news module installed. The summary template contains this:
{$entry->summary|cms_escape:htmlall}
but that text does display <p></p> tags. Some editors somehow happen to get those in their texts, I don't know why. But i was under the impression that escape:htmlall should make them disappear. Why does this not work? Anyone out there with the same experience?
escape:html not working [SOLVED]
escape:html not working [SOLVED]
Last edited by thomahawk on Thu Feb 26, 2015 12:44 pm, edited 1 time in total.
Re: escape:html not working
Hello velden
Indeed! This works. Yet, It seems I don't understand what escape:htmlall is for.
Thank you,
Thom
Indeed! This works. Yet, It seems I don't understand what escape:htmlall is for.
Thank you,
Thom
Re: escape:html not working [SOLVED]
Escaping in html means you do NOT want special characters to be interpreted as special character but just printed like it's used in the 'source'.
E.g.: < > are characters that are NOT printed by the browser but interpreted as start and end of an tag (like <p> for starting a paragraph).
Escaping '<p>' will make sure that literal text is displayed in the browser. Probably by replacing it with '<p>'
EDIT:
cms_escape:htmlall is equivalent of http://php.net/manual/en/function.htmlentities.php
E.g.: < > are characters that are NOT printed by the browser but interpreted as start and end of an tag (like <p> for starting a paragraph).
Escaping '<p>' will make sure that literal text is displayed in the browser. Probably by replacing it with '<p>'
EDIT:
cms_escape:htmlall is equivalent of http://php.net/manual/en/function.htmlentities.php
Re: escape:html not working [SOLVED]
Just to add a bit to what velden said, cms_escape works the same as http://www.smarty.net/docs/en/language. ... escape.tpl except its default char-set is utf-8.
Other than that just look at the link for specifics.
Other than that just look at the link for specifics.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!


