Easy reproduction of this behaviour can be achieved by opening the Weblinks component in de Administrator, create a new Weblink (or edit an existing Weblink) and add #sometag to the end of the url in the URL field. For instance: http://www.google.nl/index.php#anchor
The expected result would be a Weblink with the # part still in tact. Like with the google example the url would remain: http://www.google.nl/index.php#anchor
Instead of the expected result, the url get's "sanitized" and looses the # element. In the example of the google url it results in http://www.google.nl/index.php where everything after the # is removed.
Joomla 3.3.4 Stable [ Ember ] 23-September-2014 14:00 GMT
Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Ubuntu 14.04
PHP 5.5.9
Apache 2.4.7
Joomla 3.3.4 Stable [ Ember ] 23-September-2014 14:00 GMT
Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Windows Server 2008
PHP 5.3.15
IIS7
To be clear, this is NOT an issue with the com_weblinks component since it is also something that happens with components we build ourselves from scratch.
It looks like the fragment part is not reassembled when JStringPunycode::urlToUTF8() or JStringPunycode::urlToPunycode() is executed. In both methods the scheme, port, path and query are put back in the $newuri variable that is returned but the fragment part is left out.
A possible fix would be to add the following three lines to the end of both methods:
if (!empty($parsed['fragment']))
{
$newuri .= '#' . $parsed['fragment'];
}
Category | Libraries | ⇒ |
Title |
|
Status | New | ⇒ | Confirmed |
Can you provide a PR? Or should I do it?
Excuse my ignorance but what is a PR exactly??
Op 26 sep. 2014 17:28 schreef "Viktor Vogel" notifications@github.com:
Can you provide a PR? Or should I do it?
—
Reply to this email directly or view it on GitHub
#4357 (comment).
I figured out what a PR is (kind of) but I fear I am not able to provide/create that. Could you maybe try and do that or maybe explain how to do this?
This comment was created with the J!Tracker Application at http://issues.joomla.org/.
This should help you out if you're willing to give it a try -
http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests
On Fri, Sep 26, 2014 at 7:04 PM, alexvanniel notifications@github.com
wrote:
I figured out what a PR is (kind of) but I fear I am not able to
provide/create that. Could you maybe try and do that or maybe explain how
to do this?This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at
http://issues.joomla.org/http://issues.joomla.org/
http://issues.joomla.org/.—
Reply to this email directly or view it on GitHub
#4357 (comment).
Thanks mbaker, I hope I did it correctly. The PR I made can be found here: #4362
Please, if you have ANY comments on my PR, let me know. This is my first (and hopefully not the last) request so any comments are welcome and will be useful in the future.
This comment was created with the J!Tracker Application at http://issues.joomla.org/.
Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org
Category | ⇒ | Libraries |
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-09-27 12:58:43 |
closing as we have a pull here #4362
This comment was created with the J!Tracker Application at http://issues.joomla.org/.
Labels |
Added:
?
|
I can reproduce this issue, changed status to "Confirmed"!
This comment was created with the J!Tracker Application at http://issues.joomla.org/.