Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#9732 closed Bug (fixed)

Various downloadable packages have issues with formatting buttons

Reported by: Jake Hawkes Owned by:
Priority: Must have (possibly next milestone) Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description

In some browsers, optimized (minified) download packages add bizarre ascii characters after each click on the toolbar buttons bold/italic/underline/strikethrough/superscript/subscript.

I've tried this with 10 different combinations of settings ranging from the standard download, to using the builder with the full preset and all plugins except "BBCode output format". All I'm doing is (where necessary) commenting out the line in config.js that removes the buttons 'Underline,Subscript,Superscript'. Then in the editor, I click the superscript/subscript buttons and get various behavior. Note that the versions that include non-minified Source work just fine.

Windows 7 64-bit Chrome version 23.0.1271.64 IE version 9.0.8112.16421 64-bit Edition It appears to work fine in Firefox 14.0.1

Attachments (1)

Badness in Chrome.PNG (18.0 KB) - added by Jake Hawkes 11 years ago.
Screenshot of the weird behavior in Chrome

Download all attachments as: .zip

Change History (20)

Changed 11 years ago by Jake Hawkes

Attachment: Badness in Chrome.PNG added

Screenshot of the weird behavior in Chrome

comment:1 Changed 11 years ago by Jake Hawkes

When I click the Source button, it shows me this:

<p>This line has some&Acirc;&#160;<sup>&acirc;&euro;&lsaquo;SUPERSCRIPT</sup>&acirc;&euro;&lsaquo;</p>

<p>This line has some&Acirc;&#160;<sub>&acirc;&euro;&lsaquo;SUBSCRIPT</sub>&acirc;&euro;&lsaquo;</p>

<p>This line has some&Acirc;&#160;<strike>&acirc;&euro;&lsaquo;STRIKETHROUGH</strike>&acirc;&euro;&lsaquo;</p>

comment:2 Changed 11 years ago by Frederico Caldeira Knabben

Status: newpending

Do you have this issue on the online demo as well?
http://ckeditor.com/demo

The demo itself uses a version from CKBuilder.

comment:3 Changed 11 years ago by Jake Hawkes

No, it seems to work fine on the online demo. However, here's something I just discovered:

It only adds the ascii characters when I load the page as a local file (eg: "file:///C:/workspace/CKEditorSandbox/index.html"). I uploaded the exact same files to my webserver (eg: "http://evilchimps.com/CKEditor/index.html") and it works fine there.

comment:4 Changed 11 years ago by DM

Same problem for me (in several Browsers) regardless if local or online. I added a screencast (http://youtu.be/HOGcsl0WuEU), I have the problem with CK Builder and quick downloads.

comment:5 Changed 11 years ago by david

In my case the problem it is only appearing when character codification is not UTF-8. By default I use the occidental ISO-8859-1. The online demo works fine because it is UTF-8.

comment:6 Changed 11 years ago by Pani

Have exactly the same problem on different browsers. In IE8 just by clicking in to start entering text I get ï» , viewing source shows me <p>&iuml;&raquo;</p>. In chrome shift enter brings up ​, viewing source and back again starts adding  every time. Clean text field viewing source adds a <p>&Acirc;&Acirc;&#160;</p> evey time. Firefox entering text and using shift + enter works until you view the source where it starts adding <p>&Acirc;&Acirc;&#160;</p> again. Seems to be something with the whitespace and or <br>. I use ISO-8859-1 and have tried a few different things enabling/disabling in the config (docType, shiftEntermode,autoParagraph and a few more to see if it changes anything) to no affect.

Update: After a few more attempts discovered that if I change the site charset from ISO-8859-1 to UTF-8 it all woks fine. (thats the ckEditor, wish I could say the same for the rest of the site on that charset)

Last edited 11 years ago by Pani (previous) (diff)

comment:7 Changed 11 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 4.0.1
Priority: NormalHigh
Status: pendingconfirmed

comment:8 Changed 11 years ago by Wiktor Walc

@anyone - could you download CKEditor again and check if you're still having this bug? Make sure to clear browser's cache.

comment:9 Changed 11 years ago by Jake Hawkes

I just downloaded the standard build from the download page (not the Builder). It appears to be fixed for me, at least.

comment:10 Changed 11 years ago by david

It is also fixed for me! thanks!

comment:11 Changed 11 years ago by Wiktor Walc

Component: Core : StylesGeneral
Milestone: CKEditor 4.0.1
Resolution: fixed
Status: confirmedclosed

Awesome, thank you for checking!

It turned out that the issue was caused by missing UTF-8 BOM marker at the beginning of ckeditor.js. After fixing the online builder, I have recreated all packages available for download. So in order to get rid of this bug it should be enough to download the CKEditor package again (with correct BOM character in all JavaScript files).

comment:12 Changed 10 years ago by Kapil

I am using version ckeditor_4.3.2_standard . I am still getting <p>&iuml;&raquo;</p> when i click on editor window or press enter. I am using it on an app deployed in weblogic. The same is working fine when deployed in Win7 while in XP and Linux machines its giving this issue. Any help Plz. Thanks

comment:13 Changed 10 years ago by Jakub Ś

@kapilbajpaisw have you cleared Browsers cache (this isn't CTRL+F5)?

comment:14 in reply to:  13 Changed 10 years ago by Kapil

Replying to j.swiderski:

@kapilbajpaisw have you cleared Browsers cache (this isn't CTRL+F5)?

Yes I did and even I check in 4-5 machines where first time my web application url was hit (Including a machine where fresh Windows 7 was installed)

I also tries various other things like

  • add encoding = "utf-8" in <script tag.
  • in JSP <%page tag also have encoding utf-8.
  • checked if any file exists which is not having file encoding utf-8 .

comment:15 Changed 10 years ago by Jakub Ś

@kapilbajpaisw I have goggled it a lot and I can honestly say now this is encoding issue. Here is what might be wrong:

  1. Please make sure that DB encoding, Content-Type header that is sent with utf-8, page is encoded with UTF-8.
  2. Ok wwalc admitted once that there was no BOM in ckeditor.js but it is now fixed. Are you by any chance editing CKEditor core files in some editor? I'm asking because it is possible that this editor doesn't preserve BOM thus you get the problem.

Links that might help:
http://stackoverflow.com/questions/20212111/ng-bind-html-shows-acirc-char-when-empty
https://www.concrete5.org/community/forums/usage/werid-andacirc-character/
http://ncsuwebdev.ning.com/forum/topics/the-case-of-the-mysterious
http://htmlpurifier.org/phorum/read.php?3,2671
http://stackoverflow.com/questions/7349176/becomes-why-xml-iso-encoding-issue

comment:16 in reply to:  15 Changed 10 years ago by Kapil

Replying to j.swiderski:

@kapilbajpaisw I have goggled it a lot and I can honestly say now this is encoding issue. Here is what might be wrong:

  1. Please make sure that DB encoding, Content-Type header that is sent with utf-8, page is encoded with UTF-8.
  2. Ok wwalc admitted once that there was no BOM in ckeditor.js but it is now fixed. Are you by any chance editing CKEditor core files in some editor? I'm asking because it is possible that this editor doesn't preserve BOM thus you get the problem.

Links that might help:
http://stackoverflow.com/questions/20212111/ng-bind-html-shows-acirc-char-when-empty
https://www.concrete5.org/community/forums/usage/werid-andacirc-character/
http://ncsuwebdev.ning.com/forum/topics/the-case-of-the-mysterious
http://htmlpurifier.org/phorum/read.php?3,2671
http://stackoverflow.com/questions/7349176/becomes-why-xml-iso-encoding-issue

Thanks swiderski, My problem is not currently with DB . I attached CKeditor to my UI and as soon as click on editor window or press enter I gets those ASCII encoded characters. For sure it is a encoding issue . What i could confirm at my end is that my JSP page html/head tag contains <meta http-equiv="content-type" content="text/html; charset=utf-8" /> but what i am seeing is that CKEditor html/head is not having this.If this could added in CKEditor initialized iframe's html/head based on configuration . not sure my problem could be solved ?

comment:17 Changed 10 years ago by Jakub Ś

Could you send me reduced version of this page - Something that still shows error on your end but doesn't have code overhead?

Could you also tell me which server you use and have you got UTF-8 set on it?

comment:18 in reply to:  17 Changed 10 years ago by Kapil

Replying to j.swiderski:

Could you send me reduced version of this page - Something that still shows error on your end but doesn't have code overhead?

Could you also tell me which server you use and have you got UTF-8 set on it?

Unfortunately currently it is not not possible for me due to environment unavailbility. As I wrote in my first drop of issue . I developed my app in windows7 + Apache+ weblogic10.3 . it was not having any issue but when i used XP+Apache+weblogic 10.3 or Linux + Apache+weblogic 10.3. The mentioned issue of having special character started . Me too smells that there could something wrong/different in Apache or Weblogic end but thing is when i use other editor (not CKEditor) they works fine but not CKE.

comment:19 Changed 10 years ago by Jakub Ś

but what i am seeing is that CKEditor html/head is not having this.

Document should have same encoding as your page. In my HTML5 page I have <meta charset="utf-8"> and encoding for editor is the same. Please try below code on your page (in my case this was UTF-8(unicode)):

var editor = CKEDITOR.replace( 'editor1', {});			
editor.on('instanceReady', function(){
	console.log(editor.document.$.inputEncoding);
	console.log(editor.document.$.characterSet);
	console.log(editor.document.$.charset);// IE
});

You should get UTF-8 as well. If you don't, please see what is setting different encoding. This is the only way IMO.


Unfortunately currently it is not not possible for me due to environment unavailbility.

Three people in our company were trying to reproduce this issue (We know that we have sole encoding (UTF-8) set across whole application) and none of us got this error. If you won’t be able to provide sample that allows reproducing this issue in default editor I don’t think we will be able to find any solution here.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy