Skip to content
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] tag does not work when URL does not have a schema prefixed #40

Open
ghost opened this issue Feb 1, 2015 · 2 comments
Open

[url] tag does not work when URL does not have a schema prefixed #40

ghost opened this issue Feb 1, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 1, 2015

When using the DefaultCodeDefinitionSet the following does not work: [url=www.google.com]www.google.com[/url]. This is not unreasonable since it is technically not a valid URL, however most users will expect this to work. It may be fruitful to include a mechanism where it can default to the http:// schema when none is found.

This issue has been raised on behalf of https://github.com/r04r/Minichan/issues/21.

@23W
Copy link

23W commented Apr 22, 2015

Same error with img tag.
UrlValidator is very strong, it works with filter_var($input, FILTER_VALIDATE_URL) and do not pass relative URLs and URLs without scheme. May be parse_url() is better way for URL validation.

@ghost
Copy link
Author

ghost commented May 26, 2015

I have some code here to deal with this, but it's pretty hacky: https://github.com/r04r/Minichan/commit/0d2853443216d42df808a8d6d622930db38595ab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants