Home  >  Article  >  Backend Development  >  怎么过滤包含unicode 的html代码

怎么过滤包含unicode 的html代码

WBOY
WBOYOriginal
2016-06-23 14:06:051364browse

/"target="_blank"title="儿童服饰">儿童服饰</a>品牌童装招商有限公司位于广州市白云区。结合品牌<ahref="http://www.baidu.com/"target="_blank"title="童装招商">童装招商</a>日益升级的品牌消费需求,深入研究了消费者心...

这样一段内容怎么过滤啊,弄了半天都没有完美的方法,特来请教各位大师


回复讨论(解决方案)

不知道你想过滤掉什么

不知道你想过滤掉什么
过滤html 代码啊。 只留下汉字和标点符号

strip_tags() 

strip_tags(string,allow)

string 必需。规定要检查的字符串。 
allow 可选。规定允许的标签。这些标签不会被删除。 

strip_tags()

strip_tags(string,allow)

string 必需。规定要检查的字符串。 
allow 可选。规定允许的标签。这些标签不会被删除。

都不行啊 ···

引用 3 楼 jordan102 的回复:
strip_tags()

引用 4 楼 jj455909186 的回复:
strip_tags(string,allow)

string 必需。规定要检查的字符串。 
allow 可选。规定允许的标签。这些标签不会被删除。

都不行啊 ···
strip_tags

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn