Jump to content

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


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

Edited by n1concepts

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>
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.