Results 1 to 3 of 3
Thread: Php Strip Html Tags
Jan 3, 2012, 13:35 #1
Php Strip Html Tags
I am making some mods to an E-Commerce CMS (opencart) and one of them requires that there must be no html tags in the product description field.
This works fine when the products are first uploaded in the db but if you try to modify it in to back office there is a text editor which adds html tags unless you tell it not to by changing it to plain text mode. This can lead to things like:
<img src="<p>picture.jpg</p>" /> // I am wrapping the img tags around the description dynamically
There is no way around this, it is just how my modification works so I need to ensure that if the user does happen to forget to select plain text mode when editing in the back office, the html tags are stripped before it wraps the img tags around the source name.
What is the best way to strip these tags?"Persistence is the path to perfection"
Jan 3, 2012, 13:41 #2
Jan 3, 2012, 14:30 #3
Thanks Guido"Persistence is the path to perfection"