Opened 2 years ago

Closed 2 years ago

#16762 closed Bug (invalid)

data-cke- ... in normal link, image, anchor link

Reported by: michel Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:


First I did not found the link for posting tickets here. My mistake. I had first posted this problem on, someone there gave me this link.

I got a very recent version of the CKEditor that I did NOT adapt, I left it in its original state as I downloaded it. I did add one line of code in the config.js file : config.allowedContent=true; I use "inline editing".

I have to delete through PHP those data-cke-saved... that I found in a link or an image. Now I saw that I got this in an anchor link also : in an anchor link: data-cke-real-element-type="anchor"... in a normal link: data-cke-saved-href... in an image tag: data-cke-saved-src...

After adding an anchor link in the editable area WITHOUT saving it is shown as <a id="testing" name="testing"></a>, after saving see below (== Actual result ==).

I disabled other javascripts but it makes no difference, so there's no interference from other javascript.

I got an example in an attached file of how I saved into the database.

I'll be happy to answer any question or to give you any other file that you need.

Steps to reproduce

  1. just adding an anchor link in a editable are (see attached file)
  2. saving through a javascript (see attached file)
  3. saved into database with normal PHP code (see attached file)
  4. IMPORTANT : I reload the page and when I click in the editable area the CKEditor menu appears and click on the "Source" button (see picture as attached file), the anchor code is normal. But when I click on the right button of my mouse and choose "View page source" (see picture as attached file), the code for anchor link are those strange code data-cke- and has become an image as well (see below == Actual result ==).

It is saved this way into the database (see picture as attached file) Any ideas ?

Expected result

<a name="testing"></a>

Actual result

Once I retrieve it from the database (and it was saved this way into the database) : <img data-cke-real-element-type="anchor" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Anchor" alt="Anchor" data-cke-real-node-type="1" data-cke-realelement="%3Ca%20data-cke-saved-name%3D%22testing%22%20name%3D%22testing%22%20id%3D%22testing%22%3E%3C%2Fa%3E" class="cke_anchor" align="">

Other details (browser, OS, CKEditor version, installed plugins)

Firefox 47.0.1, OS Win 7, CKEditor 4.6.1 (revision 580bcaf), Standard CKEditor + Plugins : Code Snippet, Color Button, Div Container Manager, File Tools, Font Size and Family, Indent Block, Insert <pre> element, Insert symbol, Justify, Letter-spacing, Line Height, List Style, Quicktable, Show Blocks, Simple HTML5 Audio, Source Dialog, Table Resize, Text Transform, Upload Widget, Youtube Plugin

Attachments (1)

code-JS-PHP-saving-into-DB-PICTURES.docx (268.8 KB) - added by michel 2 years ago.
Pictures and codes JS and PHP for saving into DB

Download all attachments as: .zip

Change History (2)

Changed 2 years ago by michel

Pictures and codes JS and PHP for saving into DB

comment:1 Changed 2 years ago by Jakub Ś

Keywords: data-cke removed
Resolution: invalid
Status: newclosed
Version: 4.6.1
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy