문제

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