简体   繁体   中英

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 sequence 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM