Open
Description
While Autolinker correctly handles <a>
tags in the input string, it does not handle HTML <pre>
elements correctly and will apply auto-linking within those texts.
Expected
Autolinker.link(<pre>https://www.test.com</pre>)
to be <pre>https://www.test.com</pre>
.
Actual
Autolinker.link(<pre>https://www.test.com</pre>)
is <pre><a href="https://www.test.com" target="_blank" rel="noopener noreferrer">test.com</a></pre>
.
Activity
fynnfeldpausch commentedon May 12, 2020
Ideally, This would be configurable since I also would like to avoid auto-linking in
<code>
elementsgphaydon commentedon Jul 29, 2020
Is there anyway to prevent Autolinker from touching
<pre>
elements? I was wondering if, given no other config option, if replaceFn could be used to switch it off when the ancestor tag is a pre.