php - Is it possible to execute some tags within a textarea as leaving the rest as plaintext? -


i developing php-based web application in there text area within user can type whatever he/she wants , content later gets displayed on page after being stored in database. scenario user can type in html tags. far functionality constraints concerned, wish allow user execute tags such <a>, <div> etc., leaving rest of tags displayed plaintext.
had pasted question:
prevent html data being posted form textboxes
answered ways such strip_tags() , htmlspecialchars() either stripped html content displaying remaining plaintext or displayed plaintext no option adding tag exception, respectively. please help. cheers.

you can @ html purifier. library specially designed this.

it seems can handle form of xss attack. see comparison page.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -