View Single Post
  #1  
Old 23rd September 2010, 19:41
padmx82 padmx82 is offline
Junior Member
 
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default About htmlentities/html_entity_decode and security

Hi,

First of all, sorry for my english, Im from Mexico.

Im developing a website in PHP/MySQL that implements a link to Google Maps. I want to save the html code from Google Maps in a table of the database, so I began reading about website security and the XSS topic came out.

I began looking for preventive measures to avoid the XSS problem so I came with the "mysql_real_escape_string" function but then I also came up with tutorials about using "htmlentities" and "html_entity_decode" functions.

My question for you is, is the combo "htmlentities/html_entity_decode" a good way to prevent the XSS problem or is there a better solution?

Thanks in advance

Padmx
Reply With Quote
Sponsored Links