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

Andreas Zahner a.zahner at alkacon.com
Wed Jun 30 09:24:18 CEST 2010


Hi Leslie,

I think the URL you are trying to create is not standards conforming, 
because you are trying to append GET parameters behind the fragment. See 
http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax for details.

Try to place the fragment as last part of the URL, then OpenCms should 
handle the URL correctly.

-- 
Regards,
Andreas.

-------------------
Andreas Zahner

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com -  http://www.opencms.org

LesC schrieb:
> 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
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list