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

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -