I use file_get_contents() & file_put_contents() to load and save a .css file. After saving the loaded file the file_put_content
file_get_contents()
file_put_contents()
.css
file_put_content
Most likely you have Magic Quotes turned on.
So just turn it off in php.ini and restart PHP.
php.ini
To strip the slashes:
file_put_contents($file, stripslashes($_POST['editor']));