Jump to content

Need html entity to remain as Text - no conversion to less than sign


n1concepts

Recommended Posts

Hi,

 

I have a url where vendor variable is actually $ltid and based on placement in url - see below example - the 'lt' reference is being converted to the 'less than' (>) sign.

 

Is there a way I can not escape this entity so the correct variable is parsed in the link?

 

Example: http://www.domain.com/system/cAPI.php?paid=114&ltid=121

 

Note: the '&lt' is the problem - i need to render that part 'as is'

 

Results: it parses to http://www.domain.com/system/cAPI.php?paid=114&<id=121

 

'&<' which is the problem, I need '<' to remain 'lt'.

 

Any suggestions appreciated and "no, already asked - vendor can't change $ltid on their end.

 

 

Thx

When you build the link if you encode "&" as "&" this should no longer be an issue. A lot of people always encode the ampersand to prevent issues such as this.

So the link would resemble

<a href="http://somesite.com/page.php?var=1&ltid=1211" />...</a>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.