This seems to be an IE and not a Firefox issue.
If you edit the "source" and add: '
The editor interprets this literally on IE, and changes the source to '. None of the other escaped chars behave that way in source.
The behavior I'm trying to set here is when I set the initial value with text that has apostrophes in it, I am sending the apostrophes with '. Works well, except on IE... where the ' seems to be munged into ' no matter what I do.
I could not find a bug posted against this, nor do the other apostrophe help requests deal with this, so any input would help!
If you edit the "source" and add: '
The editor interprets this literally on IE, and changes the source to '. None of the other escaped chars behave that way in source.
The behavior I'm trying to set here is when I set the initial value with text that has apostrophes in it, I am sending the apostrophes with '. Works well, except on IE... where the ' seems to be munged into ' no matter what I do.
I could not find a bug posted against this, nor do the other apostrophe help requests deal with this, so any input would help!
RE: ' in source is munged on IE.
RE: ' in source is munged on IE.
fckValue = 'I'm testing apostrophes';
if (window.clientInformation.userAgent.indexOf( "MSIE " ) > 0) {
// The browser is Microsoft Internet Explorer... fix apostrophe bug.
fckValue = fckValue.replace(/'/gi, "'");
}
oFCKeditor.Value=fckValue;
RE: ' in source is munged on IE.
The code is in ASP but the theory is the same.
when you are either saving it to the db or taking from the db you need to do a replacement.
sample code - start
**********************
txtvalue = removeSpecialChars(txtvalue)
function removeSpecialChars(value)
if instr(1,value,vbcrlf) then
value = trim(replace(value,vbcrlf,""))
else
value = trim(value)
end if
if instr(1,value,"'") then
value = trim(replace(value,"'","'"))
else
value = trim(value)
end if
removeSpecialChars = value
end function
**********************
sample code - end
Obviously, you can add as many special chars as you want.
Hope this helps
Jael