Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Help: Image elements contain \"


Go to End


2 Posts   2283 Views

Avatar
AdamDimech

Community Member, 6 Posts

10 March 2014 at 1:57pm

My website is currently running SilverStripe 3.1 on PHP 5.3.27. My web host recently migrated my site to a new server and since then, I have observed the following problem when attempting to insert images into pages.

Code that should look like this:

<img class="leftAlone" title="Cineraria" src="assets/Uploads/cineraria-senecio-cruentus.jpg" alt="cineraria">

Comes out looking like this:

<img class="\&quot;leftAlone\&quot;" title="\&quot;Cineraria\&quot;" src="\&quot;assets/Uploads/cineraria-senecio-cruentus.jpg\&quot;" alt="\&quot;cineraria\&quot;">

On the page, rather than an image I see the following text (using the above example):

\"cineraria\"

I cannot use the TinyMCE HTML editor to correct the tags. Pressing "Publish" will result in the above error in the pages.

I only installed SilverStripe last month as per this. At the time, my .htaccess contained this line:

<IfModule mod_php5.c>
php_value memory_limit 128M
</IfModule>

SetEnv PHPRC "/home/mysite/public_html/silverstripe/"

I have since had to remove this to prevent an Error 500:

SetEnv PHPRC "/home/mysite/public_html/silverstripe/"

My phpinfo() file shows that magic quotes are off but I wonder if this is related.

Can anyone help? Pages created before the upgrade are still fine.

Avatar
AdamDimech

Community Member, 6 Posts

15 March 2014 at 12:54pm

I eventually managed to figure out this problem.

The solution is available on my website.