tags:

views:

61

answers:

1

Hi!

I am retrieving an html document from a MySQL db through PHP, and it has semi-colons in the style tags like this

style="background-color:black;display:block"

I've had issues with the quotes, and escaped them with slashes however I can't do the same with a semi-colon. Is there any way to escape this?

Thanks for any help!

A: 

I apologize everyone i didn't realize that escaping a semicolon is fundamental to sql injection, I'll explore alternatives.

Here's what I did, I did a str replace of ";" and replaced it with "\" style=\"" so that instead of stringing the attributes together in one style tag it put them in individual style attributes. When Firefox interpreted it, it combined them into one.

Pete Herbert Penito