• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Don't encode phrase parameters?

Liam W

Well-known member
#1
I have a url being passed as a named parameter to a phrase, but it has get params, but the & symbol is being encoded to a html entity.

Can I stop this?
 

Chris D

XenForo developer
Staff member
#2
In a template, pass the URL as {xen:raw} and in PHP pass false as the third parameter to new XenForo_Phrase().

Though I have to say... this is not something I've had to worry about before.

Are you saying you're just passing a URL string such as: "index.php?param1=1&param2=2" and it's changing & into &?

I have tested this and I do not need to use any of the methods I mentioned to get this to work.
 
Last edited:

Liam W

Well-known member
#3
I'm building the link using the XenForo link class, with extra params.

I'm then passing this built link into a phrase as a named parameter. The ampersand in the url then appears in the phrase as &.

Liam