[opencms-dev] anchor of URL being encoded (and incorrectly)

LesC leshe88-chan at yahoo.com
Tue Jun 29 19:29:41 CEST 2010


Just a followup.


On further thought this isn't an editor problem since editing the controlcode directly (bypassing the editor) causes the same problem.  I filed a bug in opencms.

As for why Firefox treats (%26) as (&), that is an idiosyncrasy of Firefox when accessing the document.location.hash property.  Other browsers return (%26) as expected.

-Leslie


> I'm editing content with FCKeditor and am trying to add multiple parameters after a “#” in the URL.  Unfortunately, the editor or OpenCMS seems to encode the “&” several times.
>
> For example:
>    http://<url>/page.jsp?id=1234&anotherid=5678#name=ABC&location=XYZ
>
> After saving, becomes:
>    http://<url>/page.jsp?id=1234&anotherid=5678#name=ABC&amp;amplocation=XYZ
> 
> Note that the "&" BEFORE the "#" doesn't get munged.  Every subsequent save adds additional "&amps" to the part AFTER the "#".  Editing the controlcode doesn’t seem to help.  Does anyone know what might be going on?
> 
> Btw, I tried substituting the URL encoded “&” (which is “%26”), but that didn't work in IE.  (Does for Firefox, even though I don't think it should).
>
> -Leslie




More information about the opencms-dev mailing list