Forums / Setup & design / Links getting messed up

Links getting messed up

Author Message

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&amp" title="http://www7.nrk.no/nrkplayer/testnettleser.aspx?hovedkategori_id=2&amp">http://www7.nrk.no/n...?hovedkategori_id=2&amp</a>;prosjekt_id=119&amp;kategori_id=0&amp;klipp_id=0&amp;indeks_id=0&amp;oppgave_id=0&amp;sok=&amp;bhcp=1&quot;&gt;

How can I fix this?

Eivind Marienborg

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 &amp;, and then cuts of the link at the ; in the &amp; .

What's the fix for this?