-
-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't allow relative links in comments #1578
Conversation
Pull Request Test Coverage Report for Build 3877434550
💛 - Coveralls |
Are we gonna throw an error in case link provided without protocol? Like |
b294257
to
ed9db9c
Compare
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? |
ed9db9c
to
e382bc5
Compare
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. |
e382bc5
to
50ce61b
Compare
01c4723
to
270ff85
Compare
270ff85
to
f9e1e18
Compare
(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.
f9e1e18
to
6500548
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(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.