我有一些内容,其中包括普通文本以及如下所示的html内容。
<div>Hello</div>
thank you
<a href="http://google.com">Google</a>
要求是允许链接,但禁用任何其他html内容。我正在尝试替换链接以外的任何HTML的HTML字符。我最终保存的内容应如下所示。
<div>Hello</div>
thank you
<a href="http://google.com">Google</a>
是否有可能在Jquery中执行此操作?
<div>Hello</div>
thank you
<a href="http://google.com"><a href="http://google.com">Google</a></a>