Jump to content
JoelWebsites

All Variables getting HTML escaped in my module in prestashop 1.7 causing module not work

Recommended Posts

Dear Guys,

All Variables getting HTML escaped in my module in prestashop 1.7 causing module not work.Does anyone know how to fix this issue?

 

Even variables that are not supposed to be HTML escaped are getting escaped and getting printed as text.How do I make prestashop aware about this issue?Please advice

Share this post


Link to post
Share on other sites

Open a .tpl file  in the default modules and see how the variables are escaped.

Share this post


Link to post
Share on other sites

This is by design. In PrestaShop v1.7, all Smarty variables are automatically escaped, so you no longer need to manually escape them. You can tell Smarty not to escape your variable by adding nofilter like this:

 

{$variable nofilter}

  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites

This is by design. In PrestaShop v1.7, all Smarty variables are automatically escaped, so you no longer need to manually escape them. You can tell Smarty not to escape your variable by adding nofilter like this:

 

{$variable nofilter}

 

Thank you so much, We were debugging PS 1.7 to the core trying to figure out where it was encoding the XML string that we send to Smarty Fetch.

Odd thing was that it just was happening with DEV MODE ON, LIVE MODE wasn't encoding anything..

 

Anyways, thanks!

Edited by Web VIZO (see edit history)
  • Thanks 1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More