I am using FCKEditor in a CMS and need to post some javascript code in the editor.
This is stored in my database but it removes the + sign from this javascript code:
function _check(val){
loadFragmentInToElement('captcha_check.php?val='+val,'captcha_div','');
}
Now why would it remove the + sign?
I’ve tried using + and %2B but then it posts + and %2B instead of a + sign.
No, outside parties will not be able to access this to post stuff.
Edit….
The form with the editor is submitted using a javascript function
called submitform. The editor content is passed as an object called
noofeditor. I see where it ‘escapes’ the code retrieved from
the editor using this:
if(noofeditor){
var editorArray=noofeditor.split('::');
for (l=0;l<editorArray.length;l++){
strData += "&"+editorArray[l]+"="+escape(FCKeditorAPI.GetInstance(editorArray[l]).GetXHTML());
}
}
Is there a way to prevent it from escaping the + sign?
How about the following: