开发者

configure tidy to escape the unknown xml tags

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜