Using XMLHttpRequest to save raw HTML

Hi,
I'm retrieving raw HTML (at least I think that's the correct definition) from an embedded CKEditor instance using the CKEditor function getData() as explained here: http://docs.ckeditor.com/#!/guide/dev_savedata. I send it from the editor to a Toolbook field which sends it to the server using XMLHttpRequest on property change. I save it as if it were a text file. I thought this system was OK. (As I mentioned previously elsewhere, on my server, the php file needs to use the php stripslashes function to avoid extra slashes appearing.) However there is another problem: the ampersand character prevents the complete text being saved. Only the text before the first occurrence of an ampersand is saved. I have overcome this by using pgReplace to convert all ampersand characters to the rarely used international monetary symbol ¤ (ansi 164) because it doesn't even exist on a number of keyboards including British and American. I can put the text back into the CKEditor by using the process in reverse all ¤ characters are set back to &.
Should I be using encodeUriComponent to do this? I'm not quite sure how this works. If not, the system described above seems pretty good but are there any other 'rogue' caharacters like the ampersand? And is there a better choice of replacement character than ¤?
I'm retrieving raw HTML (at least I think that's the correct definition) from an embedded CKEditor instance using the CKEditor function getData() as explained here: http://docs.ckeditor.com/#!/guide/dev_savedata. I send it from the editor to a Toolbook field which sends it to the server using XMLHttpRequest on property change. I save it as if it were a text file. I thought this system was OK. (As I mentioned previously elsewhere, on my server, the php file needs to use the php stripslashes function to avoid extra slashes appearing.) However there is another problem: the ampersand character prevents the complete text being saved. Only the text before the first occurrence of an ampersand is saved. I have overcome this by using pgReplace to convert all ampersand characters to the rarely used international monetary symbol ¤ (ansi 164) because it doesn't even exist on a number of keyboards including British and American. I can put the text back into the CKEditor by using the process in reverse all ¤ characters are set back to &.
Should I be using encodeUriComponent to do this? I'm not quite sure how this works. If not, the system described above seems pretty good but are there any other 'rogue' caharacters like the ampersand? And is there a better choice of replacement character than ¤?