Replies: 1 comment
-
I just posted a related feature idea, which would allow more control over attributes, which would allow using safe mode: #370 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Our Hugo site content (using unsafe mode) has a bunch of links where the text contents are full URLs that are already enclosed inside
<a>
tags, e.g:With linkify enabled, that inner URL gets wrapped in another set of
<a>
tags, but since<a>
tags can't legally nest, the resulting DOM elements are:The clickable URL text ends up as a link to the fully qualified URL from the text, instead of the relative URL from the original
href
attribute.(Yes, I know we could use normal Markdown syntax for links but we get more control over the
rel
andtarget
attributes of the<a>
tag like this).Would it be feasible for linkify to detect such links and not wrap them a second time?
Beta Was this translation helpful? Give feedback.
All reactions