0

Hope you can help me with this. On one of the fields in my add product page, I have the advertisers link to his product. It basically is a link and a button direct the customer to that link.

This is what I uploaded in the field:

<a target='_blank' href='http://click.linksynergy.com/fs-bin/click?id=3qM*AG8K6Qo&offerid=146141.3706263&type=2&subid=0'><img border="0" src='style/buynowbutton.png' width='138' height='20'><a/>

and this is what ends up in the db:

<a target=\'_blank\' href=\'http://click.linksynergy.com/fs-bin/click?id=3qM*AG8K6Qo&offerid=146141.3706263&type=2&subid=0\'><img border=\"0\" src=\'style/buynowbutton.png\' width=\'138\' height=\'20\'><a/>

How can I stop this from happening?

Any help would be greatly appreciated

1 Answers1

2

Because this strings automatically escaped
Read here, how you can improve your work with DB.

Use stripslashes and htmlspecialchars when output:

print htmlspecialchars(stripslashes($text));
Community
  • 1
  • 1
OZ_
  • 12,492
  • 7
  • 50
  • 68