Forum

Thread tagged as: Problem, Addons, CKEditor

CKEditor and quotation marks

I'm finding that when I add an image to textarea using ckeditor then the images do not get shown in the resultant html page.

My textarea content template (text_block.html) looks like this

<perch:content id="text" type="textarea" label="Text" editor="ckeditor" html="true" imagewidth="640" imageheight="480" />

When I upload the img (send to server) in CK Editor then I do see the image in the editor.

When I save the edit I see just double quotation marks on the page. e.g. https://www.okourkids.org.uk/news.php?s=watch-out-book-kids-party (that page contains just an uploaded image as content).

If I look at the html source generated, it looks like the <img src="path_to_image" has the double quote replaced by " (ampersand + quot;) and I think that might be the problem

Here are my short diagnostics:

Perch is up to date
PHP 5.4.33 version is okay, but a little out of date. Consider updating soon.
MySQL 5.6.23 is up to date
Image processing available

Summary information

Perch: 2.8.6, PHP: 5.4.33, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.6), assets (2.8.6), categories (2.8.6), perch_blog (4.6)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', );
PERCH_LOGINPATH: /admin
PERCH_PATH: /home/bvdyphst/public_html/admin
PERCH_CORE: /home/bvdyphst/public_html/admin/core
PERCH_RESFILEPATH: /home/bvdyphst/public_html/admin/resources
Image manipulation: GD
PHP limits: Max upload 20M, Max POST 20M, Memory: 128M, Total max file upload: 20M
Resource folder writeable: Yes
HTTP_HOST: www.okourkids.org.uk
DOCUMENT_ROOT: /home/bvdyphst/public_html
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php

Thanks for any help...

Nigel Harding

Nigel Harding 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using the latest CKEditor from our site?

Yes, CKEditor 1.9.1 from the Perch site

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do images upload to Assets successfully when CKeditor isn't involved?

Yes, so for example, on this page:

https://www.okourkids.org.uk/news.php?s=charitys-launch

The 1st image is placed there by the perch template (a list/detail page, this is the main/thumbnail image) whereas further down the page you will see pairs of quotation marks which are generated by efforts to insert (upload) images using CKEditor.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does other HTML work without being double encoded within the editor?

No, if I add a link then the href seems to get double encoded too

I have figured out what was happening. In my list/detail templates I had missed out an html=true attribute.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.