开发者

This regex not working for <b>

开发者 https://www.devze.com 2023-01-20 23:57 出处:网络
</?(?i:script|div|table|frameset|b|frame|iframe|style)(.|\\n)*?> I\'m trying 开发者_如何学运维to filter certain HTML elements using this regex expression.I also want to filter \"b\" and \"/b\"
</?(?i:script|div|table|frameset|b|frame|iframe|style)(.|\n)*?>

I'm trying 开发者_如何学运维to filter certain HTML elements using this regex expression. I also want to filter "b" and "/b" as well but it doesn't seem to work for those.

Thank you.


I would recommend you to instead of removing some specific tags, to allow some specific tags, and remove all other. That is, have a default-forbid policy.

0

精彩评论

暂无评论...
验证码 换一张
取 消