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

3.0 UrlHelper - build method is returning a escaped url #5630

Closed
golgher opened this issue Jan 11, 2015 · 3 comments
Closed

3.0 UrlHelper - build method is returning a escaped url #5630

golgher opened this issue Jan 11, 2015 · 3 comments

Comments

@golgher
Copy link

golgher commented Jan 11, 2015

UrlHelper is escaping html when build an url.
Example:

echo $this->Url->build(array('action'=>'some_action','param1'=>1,'param2'=>'teste'));

Url expected:
/admin/users/add?param1=1**&param2=teste
Url returned:
/admin/users/add?param1=1
&**param2=teste

In my application was easy to fix this error using html_entity_decode, but the build method must return a unescaped url, or at least a possibility of configure the escape option.

@markstory
Copy link
Member

Why? UrlHelper is for use in HTML. HTML requires & to be encoded.

@golgher
Copy link
Author

golgher commented Jan 11, 2015

Sorry and thanks for the explanation. I will use Router::url

@golgher golgher closed this as completed Jan 11, 2015
@markstory
Copy link
Member

Cool, that was going to be my recommendation as well 😄

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