mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
020075e12f
The visitLinksForShortLinks feature would look inside of an <a> tag and run shortLinkProcessorFull on any text, which attempts to create links out of potential 'short links' like [[test]] [[link|example]] etc... This makes no sense because you can't have nested links within an <a> tag. Specifically, the html5 standard says <a> tags can't include interactive content if they contain the href attribute: http://w3c.github.io/html/single-page.html#the-a-element And also defines an <a> element with a href attribute as interactive: http://w3c.github.io/html/single-page.html#interactive-content Therefore you can't really put a link inside of another link. In practice none of this works anyways since browsers won't render it, it would probably be broken if they tried, and it is causing a bug (#4946). No current tests rely on this behavior either. This removes the feature and also explicitly excludes the current visitNodeForShortLinks from looking in <a> tags. |
||
---|---|---|
.. | ||
csv | ||
external | ||
markdown | ||
orgmode | ||
html.go | ||
html_internal_test.go | ||
html_test.go | ||
markup.go | ||
markup_test.go | ||
sanitizer.go | ||
sanitizer_test.go |