Closed paskal closed 1 year ago
Totals | |
---|---|
Change from base Build 3872384385: | 0.007% |
Covered Lines: | 5787 |
Relevant Lines: | 6880 |
Are we gonna throw an error in case link provided without protocol? Like [google](google.com)
. Because it results in a link that refers to ${currentUrl}/google.com
This change prohibits posting relative links. I have to think about how to parse markdown correctly, but the change is already working and can be tested. @umputun, what do you think about the whole idea of blocking the relative URLs?
Using relative links intentionally is an extremely rare use case. One would need to have a file server on the same subdomain as Remark42 to make any sense of this. I believe disabling such links is a good idea and will work well in 99.9% of cases.
(url) is a text inserted by default and never an intended URL.
That additional validation will ensure that users won't post relative links because they are rarely intended.
This is how it looks without frontend changes:
Backend part for #809.