Log in or register to post comments
Last post
<a data-cke-saved-href= gets put in my links. Why?
I'm having some issues with ckeditor changing what I write.

This:
      <p>
         <a href='{exp:download_file:link file="/panels/tank/manuals/Church's Chicken manual.pdf" template="/index.php/panels/" }'>Installation for Church's Chicken</a></p>

Turned into this:
      <p>
         &lt;a data-cke-saved-href="{exp:download_file:link file=&amp;quot;/panels/tank/manuals/Church" href="%7Bexp:download_file:link%20file=%22/panels/tank/manuals/Church" s="" tank="" installation="" manual.pdf"="" template="/index.php/panels/" }'=""&gt;tank Installation for Church's Chicken</p>


How can I get ckeditor to stop doing this? Is there a config value to set? Thanks a bunch! Awaiting a reply.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
I have the exact same issue as the above poster. I am editing a link like
<a href="somelink">SOME TEXT</a>

and when switching to wysiwyg mode and then looking at the content with getData() it gets turned into
<a data-cke-saved-href="somelink" href="somelink">SOME TEXT

with the unwelcome "data-cke-saved-href" attribute and a MISSING closing tag. Has anyone any idea what is happening?
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
data-cke-saved-href is used to change the href attribut if needed href ist protected by most Browsers so CKEditor have to rewrite the link. But normaly if you submit the form where CKEditor is used all the data-cke-saved-* attributs are deleted.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
Just to correct better that answer:
the browsers might change the href of a link (for example resolve a relative link and turn it into absolute), so CKEditor inserts that internal data-cke- attribute with the desired value but that won't be visible unless you use a debugging tool or try to grab manually the contents of the iframe.
In the case of the first message, it has a first syntax error as it's using a single quote inside an attribute delimited with single quotes and even after that, as the value of the href is quite strange it might trigger some unknown bug in CKEditor.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
Same problem here!!! The interesting part is that the problem started to happen overnight, without any updates to Drupal modules. Was anybody able to fix this issue?
Thanks!!
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
I'm having the same exact issue -- it just happened without any updates.

This is the source code when I insert an image before I save:
<img alt="" src="/sites/default/files/creed.png" style="width: 300px; height: 52px;" />

Then this is what is displayed after save instead of the image:
<img alt="" data-cke-saved-src="/sites/default/files/creed2.png" src="/sites/default/files/creed2.png" 285px;="" height:="" 191px;\\\\\\\\\\\\\\\\"="">

And then this is the altered source code:
<p>&lt;img alt=&quot;&quot; data-cke-saved-src=&quot;/sites/default/files/creed2.png&quot; src=&quot;/sites/default/files/creed2.png&quot; 285px;=&quot;&quot; height:=&quot;&quot; 191px;\\\\\\\\\\\\\\\\&quot;=&quot;&quot;&gt;</p>

Any ideas?
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
So all of you are using Drupal?

And this problem happens with all the browsers?
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
Yes, Firefox, Chrome, Safari -- haven't tested IE
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
Hi,

I'm still having this issue. Any ideas? I have one site running with 3.6.1 and one with 3.6.2 and they are both experiencing this problem.

Thanks.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
If it only happens in Drupal, you should ask in the Drupal forums. That's the best chance to find out what's the problem
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
This happens to me not at all in Drupal, I include Ckeditor myself in my javascript app.
Also, I am getting the value not by grabbing it in the iFrame myself, but with getData(). I will explore the quote thing and get back to you.

Also, my main problem is the disappearance of the closing tag </a>, the data-cke-saved-href is annoying but not at all as much as the closing tag problem.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
In my case, here is the link

<a href="http://www.anonymous.com/world/communaute/album/alblist__CategorieID=39.html" onmouseover="af_navBigTeaser('af_nav_mode', 'album',0);">Albums Mode</a>


I don't see any obvious syntax problem.

EDIT: this is actually the exact value I setData() my CKEditor to (I am not in fullpage mode).
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
I can now confirm the problem appears because the '=' character is in the href. If I delete the '=', everything works fine. I know the unencoded '=' is used here in a non-standard place, and is therefore invalid. But it seems to me this could still be repaired by CkEditor.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
My issue has been resolved. Turns out not to be a Drupal or CKEditor problem, but the shared host (Hostmonster) updated their servers which caused CKEditor to break. To resolve this I had to create a new php.ini file in my root directory and have magic_quotes_gpc set to off.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
Enzo90910 wrote:In my case, here is the link

<a href="http://www.anonymous.com/world/communaute/album/alblist__CategorieID=39.html" onmouseover="af_navBigTeaser('af_nav_mode', 'album',0);">Albums Mode</a>


I don't see any obvious syntax problem.

EDIT: this is actually the exact value I setData() my CKEditor to (I am not in fullpage mode).

I've tried to paste that code in Source mode at ckeditor.com/demo and after switching to design and back to source I see the same code (except for the formatting paragraph).
Are you sure that it isn't a problem with your server or your CMS?
The = at the href isn't strange, any page with parameters will have those assignments and they must not be encoded.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
alfonsoml wrote:The = at the href isn't strange, any page with parameters will have those assignments and they must not be encoded.


yes,'=' must not be encoded if it is in the query string part of the URL, but if I read the standard correctly, it must if it is in the location part.

I will try to reproduce the problem with external version of ckeditor and post back here after.
Re: &lt;a data-cke-saved-href= gets put in my links. Why?
Been there, done that. Problem didn't exist with online versions of CkEditor. I finally figured it was entirely due to a patch I was applying to CKEd. Thanks to everyone who answered.
enzo90910, what patch were

enzo90910, what patch were you applying that caused the problem? I've recently noticed this problem happening in some pages in my site as well.

If you could let me know what patch you applied that triggered this I would really appreciate it.

Thanks,
Pablo

I'm having this same problem.

I'm having this same problem. The saved link looks like:

 <a _cke_saved_href="http://yahoo.com" href="javascript:void(0)/*241*/">

When I then bring the text block back into ckeditor, the _cke_safved_href attribute is indeed gone, but that leaves the links as javacript:void(0). Which really isn't what is wanted. Needless to say, this is causing some consternation with my users whose links don't work. 

 

This happened after I upgraded to ckeditor4 from ckeditor3.