Jump to content

%7Burl%7D get these when entered {url} in href of email translation


Shurek

Recommended Posts

The topic title says it all.

 

When i put this html

<a style="color: #337ff1;" href="{url}">{url}</a> 

In the password_query -  save it - look after the save in the code it will be changed to this:

<a style="color: #337ff1;" href="%7Burl%7D">{url}</a> 

Can someone tell me how to correct this?

 

Prestashop version: 1.6.0.11

Edited by Shurek (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

The string is just being encoded before it's added to the database, (mostly as precaution to injection, I believe)

 

http://php.net/manual/en/function.urlencode.php

 

 

You can (and normally will be done automatically by prestashop) decode it:

 

 

http://php.net/manual/en/function.urldecode.php

 

 

Not sure where this field is that you try to fill with this code, but maybe look at it's definition and see if you can change it's type/parameters BEFORE it enters it into the database

 

 

And now the question: Why would you add code like that to the password query in the first place... (Seems like some hacking or so :-) ) 

Just curious...

 

My 2 cents,

pascal

Link to comment
Share on other sites

The password_query is the email send when users ask for a new password. :)

The string: 

<a style="color: #337ff1;" href="{url}">{url}</a>

Is added in the translation of the email translation route to email template:

Localisations - Translations - Email template translations - also selected my theme.

 

But i was in a hurry so i have made an url with a direct link - However it is strange, the url only between the double quotes are affected.

 

Thanks however for you response Pascal

 

Best Regards,

 

Sjoerd

 

ps. I will try to read the post in french, since it is not easy to read for me Merci bien - Vince

Edited by Shurek (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

i have follow all the information regarding to changing emails in translation. but it does not change and messed up all emails. even if i customize one email template. it save 

%7 & %7D. i have changed {urletc}. and put the fix. is there designer prestashop can recommend me so they can fix the site for us. please put some proper help which this issue can be resolve. thanks
Link to comment
Share on other sites

  • 5 months later...
  • 3 weeks later...
  • 1 year later...

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...