An alternative to php tidy?

前端 未结 4 1736
眼角桃花
眼角桃花 2020-12-09 22:15

I use php tidy to process html input in my database,

$fragment = tidy_repair_string($dom->saveHTML(), array(\'output-xhtml\'=>1,\'show-body-only\'=>         


        
4条回答
  •  死守一世寂寞
    2020-12-09 22:45

    HTML Purifier can rewrite HTML to be standards-compliant like HTML Tidy. If you need to filter that input for XSS prevention, etc., it will do that as well.

    It's all PHP, so you should be able to use it on any server.

提交回复
热议问题