Amazzing Posted October 25, 2014 Share Posted October 25, 2014 According to Prestashop Validator requirements, all tpl {$variables} have to be escaped ('htmlall', 'intval', etc.). What if a variable contais HTML code, and needs to be displayed as is, without escaping any tags, quotes ar anything else? Is there any option, like |escape:'none'? Or may be there is another way to validate this kind of variables? Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted October 26, 2014 Share Posted October 26, 2014 Just leave it as it is. You can't escape that variable, because it does not require escaping. Just ignore the validator error. Link to comment Share on other sites More sharing options...
bellini13 Posted October 26, 2014 Share Posted October 26, 2014 The addons team may still reject it, so they suggest adding a smarty comment next to the variable... like {* HTML, cannot escape*} 1 Link to comment Share on other sites More sharing options...
Matthieu Malttt Posted January 14, 2016 Share Posted January 14, 2016 Workaround i made is : {html_entity_decode($var|escape:'htmlall':'UTF-8')} Validator doesn't care after that. 3 Link to comment Share on other sites More sharing options...
nico037 Posted April 12, 2016 Share Posted April 12, 2016 Thanks Matthieu Malttt ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now