Reputation: 16880
There are a few similar questions on SO, but none explain the problem I am having.
I am using TomatoCMS hosted on 1and1.
The problem I am having is with:
tinyMCE.getInstanceById('content').execCommand('mceInsertContent', false, '<img src="' + url + '" alt="" />');
Where url
could be http://example.com/uploads/123.jpg
The image is correctly inserted into the tinymce preview area, however the content of the original textarea
is set to:
<img src="%5C" alt="\"\"" />
This therefore what is saved to the database.
Does anyone have a solution for this?
Upvotes: 1
Views: 2919
Reputation: 16880
This is caused by PHP Magic Quotes.
To solve, place a php.ini
file in the root of the website containing:
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
I found this solution in a post about another software package hosting on 1and1. How to install Precurio on 1and1 servers
Upvotes: 2
Reputation: 50832
I am not perfectly sure, what goes wrong here, but i guess it might have to do with the encoding. You may try the configuration settings provided for this: http://www.tinymce.com/wiki.php/Configuration:entity_encoding
Upvotes: 1