Thread
:
Using regular expressions to clean HTML in user input
View Single Post
05-21-2006, 10:50 PM
#
3
(
permalink
)
DJMaze
Senior Contributor
Join Date: Mar 2005
Posts: 678
preg_replace('#<([a-z0-9]+)(.*?)>(.*?)</\\1>#', '<\\1\\2>\\3</\\1>', $input);
DJMaze
View Public Profile
Find More Posts by DJMaze