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
com_banners doesnt allow relative links and links without protocol #17958
Comments
Removing the filter rule doesn't actually fix anything and in fact removes a level of validation (there's no longer an assurance that the value is a valid URL). The correct fix would be to adjust the URL validation to allow these types of relative URLs and not just require absolute URLs. |
Ok. I dont suppose thats the right way |
If you have a piece of content that is available via HTTPS you can always link to it through the HTTPS link, it doesn't need to be protocol relative. The one thing that will be an issue for you is if your page is loaded over HTTPS and tries to use HTTP, most browsers will raise a warning or block that secure-to-insecure request. |
Yep, and thats important issue. |
Your site should never be available on both http and https - thats really bad for SEO. So i dont see what the problem is to be fixed here |
Ignoring the HTTP versus HTTPS issue, it seems like our URL filters and/or validation disallow relative URLs. |
So that is a different and more generic issue. I dont see how a relative url could be validated though as it wont look any different to plain text. URL without a protocol eg beginning // should be made to validate though |
We could add relative=true to the xml and that would allow relative urls to be saved At the end of the day the banners component is designed for banners linking to other sites and not your own |
Steps to reproduce the issue
In admin-part in banner item it you add clickurl as '/page.html' or '//site.com/page.html' it doesnt allow
Expected result
'/page.html' or '//site.com/page.html'
Actual result
'http://site.com//page.html' or 'http:////site.com/page.html'
System information (as much as possible)
3.7.5
Additional comments
way to fix - change filter="url" to filter="" in /administrator/components/com_banners/models/forms/banner.xml
Also thread where I discuss about - https://joomlaforum.ru/index.php/topic,341577.new.html#new
The text was updated successfully, but these errors were encountered: