【Oracle】【10】去除数据中的html标签

--通过正则表达式的方式去除html标签
select regexp_replace(content,'</?[^>]*>|nbsp;|&','') content from table

原因:防止XSS攻击(如果数据中有html样式或者脚本语句的话,取出来后可能会对页面造成影响)

参考博客:

oracle clob字段去除html标签 - ardo_pass的博客 - CSDN博客
https://blog.csdn.net/ardo_pass/article/details/67635087

猜你喜欢

转载自www.cnblogs.com/huashengweilong/p/10805360.html
今日推荐