spinelle Posted August 11, 2014 Share Posted August 11, 2014 (edited) Bonjour, J'essaie de valider un module dans PrestaShop Validator, mais il me reste une erreur. Je veux utiliser un "categories tree" donc j'ai fait quelque chose comme ça en php : pour >= 1.6.0 : $helper = new HelperTreeCategories('categories-treeview'); $category_tree = $helper->render(); pour < 1.6.0 : $helper = new Helper();$category_tree = $helper->renderCategoryTree(); et dans mon template : {$category_tree} La variable category_tree est de l'HTML. L'erreur générée est : "Variable should be escaped, modifier not found ('htmlall', 'intval', etc.)." Que devrais-je faire ? Merci Edited August 12, 2014 by spinelle (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2014 Share Posted August 11, 2014 {$category_tree|escape:'html':'UTF-8'} Link to comment Share on other sites More sharing options...
spinelle Posted August 11, 2014 Author Share Posted August 11, 2014 (edited) Merci, mais comme je l'ai précisé, la variable contient de l'HTML, donc si je fait cela, ça ne fonctionnera plus. Edited August 12, 2014 by spinelle (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted August 11, 2014 Share Posted August 11, 2014 Bonjour, Merci de respecter la langue du forum qui est ici en français et non en anglais. Si vous désirez de l'aide en anglais vous pouvez le faire dans le forum anglais. Link to comment Share on other sites More sharing options...
spinelle Posted August 12, 2014 Author Share Posted August 12, 2014 Désolé, c'est corrigé. Link to comment Share on other sites More sharing options...
spinelle Posted August 22, 2014 Author Share Posted August 22, 2014 Merci à Vekia pour sa solution : escape:'UTF-8' Link to comment Share on other sites More sharing options...
mahesh7789 Posted May 22, 2017 Share Posted May 22, 2017 (edited) i am using prestashop 1.7 my code is in controller $helper = new Helper(); $category_tree = $helper->renderCategoryTree(); {$category_tree|escape:'html':'UTF-8'} why it display text http://prntscr.com/fam0ok Edited May 22, 2017 by mahesh7789 (see edit history) 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