开发者

configure tidy to escape the unknown xml tags

开发者 https://www.devze.com 2023-01-04 13:40 出处:网络
I am using tidy to make HTML entered by the user well-formed and i have configured tidy to accept only few html tags. Is there a way i can tell tidy to escape s开发者_如何学编程equence the xml tags th

I am using tidy to make HTML entered by the user well-formed and i have configured tidy to accept only few html tags. Is there a way i can tell tidy to escape s开发者_如何学编程equence the xml tags that are not known. Example input and the expected output are given below-

Input::

<div>

<p>this is a paragraph</p>

<unknown-tag>text in unknown tag</unknown-tag>

<div>

Expected out::

<div>

<p>this is a paragraph</p>

&lt;***unknown-tag*&gt;text in unknown tag&lt;/unknown-tag&gt;**

<div>

Best Regards, Keshav


i have also posted this question to tidy forum's and seems there is not way as of now to do this.

BR,
Keshav

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号