Hello. I am working on a customization where a user can pick an article from within our content system and then a link to that article is inserted into the content editor.
My problem is that the URL contains ampersands (&), and they always get translated to &.
In Fact when you click on the stock link button and try to enter a URL with &'s (pretty common), the ampersands get turned into &.
I tried escaping it like /& in my code, but that didn't work. Any ideas?
Thanks,
-Ryan
My problem is that the URL contains ampersands (&), and they always get translated to &.
In Fact when you click on the stock link button and try to enter a URL with &'s (pretty common), the ampersands get turned into &.
I tried escaping it like /& in my code, but that didn't work. Any ideas?
Thanks,
-Ryan
RE: Escape ampersand character on links?
hth,
Markus
RE: Escape ampersand character on links?
-Ryan
RE: Escape ampersand character on links?
how did you solve the problem?
SImone
RE: Escape ampersand character on links?
I'm trying to do a similar thing. Instead of using & I'd like to use &. This is our sitewide standard for use instead of the ampersand. I tried to incorporate the conversion and other common character conversions (see code below), but was unsuccessful. This code can be found in "fckeditor.js".
Any insight would be greatly appreciated.
Thanks,
- Ed Parker
FCKeditor.prototype._HTMLEncode = function( text )
{
if ( typeof( text ) != "string" )
text = text.toString() ;
text = text.replace(/&/g, "&") ;
text = text.replace(/"/g, "$") ;
text = text.replace(/</g, "<") ;
text = text.replace(/>/g, ">") ;
text = text.replace(/'/g, "'") ;
text = text.replace(/@/g, "@") ;
text = text.replace(//g, "©") ;
text = text.replace(//g, "®") ;
return text ;
}