Close open HTML tags in a string

后端 未结 9 1950
南方客
南方客 2020-11-28 11:21

Situation is a string that results in something like this:

This is some text and here is a bold text then the post stop here....

9条回答
  •  孤城傲影
    2020-11-28 12:07

    if tidy module is installed, use php tidy extension:

    tidy_repair_string($html)
    

    reference

提交回复
热议问题