?
avatar sakiss
sakiss
6 Mar 2020

Steps to reproduce the issue

In any layout file add the following code:

<?php
$uri = Uri::getInstance('index.php?option=com_content&var=#//:?&@\')');?>
<a href="<?php echo $uri;?>">some link</a>

Then check the link in the browser.

Expected result

The link contains special characters which are supposed to be encoded.
Otherwise the url is not functional.

Actual result

Not encoded special characters.
Even if we pass the characters encoded, those are decoded when the url is converted to string.

System information (as much as possible)

Joomla 3 and Joomla 4

avatar sakiss sakiss - open - 6 Mar 2020
avatar joomla-cms-bot joomla-cms-bot - change - 6 Mar 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Mar 2020
avatar sakiss sakiss - change - 6 Mar 2020
The description was changed
avatar sakiss sakiss - edited - 6 Mar 2020
avatar sakiss sakiss - change - 6 Mar 2020
The description was changed
avatar sakiss sakiss - edited - 6 Mar 2020
avatar sakiss sakiss - change - 6 Mar 2020
The description was changed
avatar sakiss sakiss - edited - 6 Mar 2020
avatar sakiss
sakiss - comment - 10 Mar 2020

Opened that to the proper repository:
joomla-framework/uri#22

avatar sakiss sakiss - change - 10 Mar 2020
Title
Joomla\CMS\Router\Route::_ does not encode special characters
Uri does not encode special characters
avatar sakiss sakiss - edited - 10 Mar 2020
avatar sakiss sakiss - change - 10 Mar 2020
The description was changed
avatar sakiss sakiss - edited - 10 Mar 2020
avatar sakiss sakiss - change - 10 Mar 2020
Title
Uri does not encode special characters
Uri::toString does not encode special characters
avatar sakiss sakiss - edited - 10 Mar 2020
avatar sakiss sakiss - change - 10 Mar 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-03-10 19:09:53
Closed_By sakiss
avatar sakiss sakiss - close - 10 Mar 2020

Add a Comment

Login with GitHub to post a comment