質問

In my project I use php and yii framework. I have a predefined set of the disallowed html tags(for example - "script, object") and I need to check that entered text don't contain any of these tags.

What function I can use in order to do that ?

役に立ちましたか?

解決

If you're dealing with potentially unsafe HTML from the client (WYSIWYG editors etc.), I'd use a library like HTML Purifier. It lets you to specify allowed and disallowed tags.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top