I'm creating a WYSIWYG editor that saves the page via AJAX.
How it works is you add your elements (text, images, etc) to a DIV via the editor, and when you click "save", it sends that DIV's HTML through AJAX to a script that takes this HTML and writes it into "index.html", so it'll update the front page.
My problem: if the DIV has a background image, the AJAX page screws up. Something to do with all the quotes is my guess (<div style="background-url('picture.png');">
). It handles everything else fine (images, text with both single and double quotes, etc).
I was looking through Firebug, and it's reporting that it's changing the 'picture.png'
to "picture.png"
. I've tried replacing the "
before it sends, but it's still breaking on the other end from all the quotes.
Does anyone have any idea?