Forums / Setup & design / Links getting messed up
Eivind Marienborg
Thursday 19 August 2004 1:48:51 am
I'm using the autolink-function in my forum (like here on the ez.no-site). But when people enter URLs with & / & in them, the link gets messed up.
When "http://www7.nrk.no/nrkplayer/testnettleser.aspx?hovedkategori_id=2&;prosjekt_id=119&kategori_id=0&klipp_id=0&indeks_id=0&oppgave_id=0&sok=&bhcp=1" is entered, it outputs
<a href="http://www7.nrk.no/nrkplayer/testnettleser.aspx?hovedkategori_id=2&" title="http://www7.nrk.no/nrkplayer/testnettleser.aspx?hovedkategori_id=2&">http://www7.nrk.no/n...?hovedkategori_id=2&</a>;prosjekt_id=119&kategori_id=0&klipp_id=0&indeks_id=0&oppgave_id=0&sok=&bhcp=1">
How can I fix this?
Thursday 19 August 2004 1:58:56 am
Well that worked well, didn't it..
What happens is that the links gets cut of at the first & , creating bogus links because whatever's behind the & gets cut off. Studying the code, it apperas that it first translates & to &, and then cuts of the link at the ; in the & .
What's the fix for this?