mirror of
1
Fork 0
forgejo/modules/markup
mrsdizzie 020075e12f Remove visitLinksForShortLinks features (#6257)
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.
2019-03-07 14:13:44 -05:00
..
csv Add csv file render support defaultly (#4105) 2018-07-21 00:08:15 +03:00
external support envs on external render commands (#5278) 2018-11-20 17:11:21 -05:00
markdown Allow markdown files to read from the LFS (#5787) 2019-02-12 15:09:43 +00:00
orgmode Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) 2019-01-30 17:17:43 -05:00
html.go Remove visitLinksForShortLinks features (#6257) 2019-03-07 14:13:44 -05:00
html_internal_test.go Rework special link parsing in the post-processing of markup (#3354) 2018-02-27 09:09:18 +02:00
html_test.go Remove visitLinksForShortLinks features (#6257) 2019-03-07 14:13:44 -05:00
markup.go Prioritize "readme.md" (#5691) 2019-01-14 14:15:06 -05:00
markup_test.go Prioritize "readme.md" (#5691) 2019-01-14 14:15:06 -05:00
sanitizer.go Restructure markup & markdown to prepare for multiple markup language… (#2411) 2017-09-16 20:17:57 +03:00
sanitizer_test.go Restructure markup & markdown to prepare for multiple markup language… (#2411) 2017-09-16 20:17:57 +03:00