Skip to content

Uri::toString does not encode special characters #22

@sakiss

Description

@sakiss

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/reserved characters which are supposed to be encoded.
Otherwise the url is not functional.

Actual result

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions