-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
url_for helper doesn't work for mailto link #122
Comments
There is no better way to fix this. We might need to hardcode some whitelist protocols inside hexo-util, just as one of contributor of nodejs gives: nodejs/node#28482 |
@curbengh Any idea? In Currently I only come up with the idea of whitelist protocols. |
The workaround is necessary to support path with a semicolon. However, since I'm assuming |
When I created #114, I assumed In relation to theme-next/hexo-theme-next#1260, I wonder why Btw, this issue is still going to be fixed. |
thx @curbengh and I am not the author of theme-next, maybe they wrap every link with url_for :( |
theme-next is using a custom helper |
https://github.com/hexojs/hexo-util/blob/master/lib/url_for.js#L28-L31
it will return origin path when met external link like http://example.com, but will not return origin path for mailto: someone@example.com. and lead to an issue when relative_link was set.
url_for('/category') => /relative_link/category <= OK!
url_for('http://example.com') => http://example.com <= OK!
url_for('mailto:someone@example.com') => /relative_link/mailto:someone@example.com <= Ops!
The text was updated successfully, but these errors were encountered: