THELIA Forum

Welcome to the THELIA support and discusssion forum

Offline

#1 Thelia smarty html tags

(19-02-2019 12:00:39)


Hello,
I have this case,
Product are index in elasticsearch and when i search for it, i format the repose for title to highlite the search work
ex:
If I search for porduct like this query string is "grohe k7" i get the title for all matching products like this :  "<strong>Grohe</strong> <strong>K7</strong> Einhandmischer-Spültisch", witch is corect from point of semantics  , but when i "print"  to search result page i get plain text,  "<strong>Grohe</strong> <strong>K7</strong> Einhandmischer-Spültisch" and is ignored the html tags.
I  try  nofilter, escape, unescape, strip_tags  but no success.

If the is some one witch has a solutions for this let me know

Br.,
Lucian

Offline

#2 Re: Thelia smarty html tags

(19-02-2019 12:54:42)


if the search result is in a smarty variable, you shoud get the unescape text using nofilter attribute :

{$your_variable nofilter}


CQFDev | Sites, boutiques, modules, développement et intégration pour Thelia 1 et 2

Offline

#3 Re: Thelia smarty html tags

(19-02-2019 13:42:34)


Hello,
It doesn't work but it works like this >

{$var_name|html_entity_decode nofilter}


I don't get why

Br, Lucian

Last edited by lucian.criste (19-02-2019 13:43:01)

Offline

#4 Re: Thelia smarty html tags

(19-02-2019 15:06:33)


I suppose that the variable content is somewhere HTML entity encoded before beeing passed to Smarty.


CQFDev | Sites, boutiques, modules, développement et intégration pour Thelia 1 et 2