PHP convert string to htmlentities

前端 未结 4 1248
北恋
北恋 2020-12-22 11:44

How can I convert the code inside the and

 tags to html entities ?

 
a
4条回答
  •  太阳男子
    2020-12-22 11:59

    This is related somewhat, you do not have to use Geshi, but I wrote a bit of code here Advice for implementing simple regex (for bbcode/geshi parsing) that would help you with the problem.

    It can be tweaked to not use GeSHi, just would take a bit of tinkering. Hope it helps ya.

提交回复
热议问题