#2001 closed Bug (invalid)
Numeric entities are not preserved
Reported by: | richard | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Output Data | Version: | FCKeditor 2.6 Beta |
Keywords: | Confirmed | Cc: |
Description
If I use the Insert Special Character dialog and choose a character that uses an entity number, e.g. ‛ or ► (right pointing triangle, in this case), intead of an entity name, e.g. ™ or •, the actual character goes into the editor window rather than the entity number/name (which can be viewed in source). On saving, the character is replaced with a question mark. I notice that if I paste an entity number into view source, then click out and back to source again, the number is converted to the name, except for numbers ‛ and ►. These are converted to the characters, which one save are replaced with question marks.
Change History (6)
comment:1 follow-up: 2 Changed 17 years ago by
Component: | UI : Floating Panel → Core : Output Data |
---|---|
Keywords: | Pending added |
Version: | → FCKeditor 2.6 Beta |
comment:2 Changed 17 years ago by
Replying to w.olchawa:
Hi!
[...]
However when it is for replacing characters with a question mark I can't confirm it. In my case the output was
<p>‛ or ►</p>
which is of course wrong. because it should be<p>‛ or ►</p>
.
I think it is because when we save it to the db (MS SQL 2000), the db isn't recognizing the special character, so replaces it w/ a question mark. So the question mark is not the problem of FCK Editor, rather the problem is that FCK Editor is converting to the character, rather than leaving it's entity number, which results in the db saving it as a question mark.
Thank you
comment:3 Changed 17 years ago by
Keywords: | Confirmed added; Pending removed |
---|
Confirmed with IE and FF2.
comment:4 follow-up: 5 Changed 17 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Summary: | Insert Special Character saves question mark character when using entity number instead of entity name for two special characters → Numeric entities are not preserved |
This problem is not related to the Insert Special Character dialog. It is enough to paste <p>‛ or ►</p>
in the source view. Switching back and forth to the WYSIWYG view, you will see that the entities are replaced with their relative chars.
This is a browser limitation. As soon as you feed the browser with entities, those are automatically translated to the specific character and the entities are lost. All we can do is replacing those chars with entities again, when outputting the HTML.
For numeric entities, this thing can't be done automatically because every single character can be transformed in an entity in this way.
But, we have a dedicated setting for that: AdditionalNumericEntities. So, just set the following in the configuration file and things will work for you:
FCKConfig.AdditionalNumericEntities = '‛|►' ;
Note that the raw chars are being used there.
comment:5 Changed 17 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Replying to fredck:
This problem is not related to the Insert Special Character dialog. It is enough to paste
<p>‛ or ►</p>
in the source view. Switching back and forth to the WYSIWYG view, you will see that the entities are replaced with their relative chars.This is a browser limitation. As soon as you feed the browser with entities, those are automatically translated to the specific character and the entities are lost. All we can do is replacing those chars with entities again, when outputting the HTML.
For numeric entities, this thing can't be done automatically because every single character can be transformed in an entity in this way.
I think these statements are not correct.
Other numeric entities, e.g. © or ® , are converted in the editor to © or ® respectively, when toggling source view. It seems (so far) that only ‛ or ► are "replaced with their relative chars."
Looking into this further, it appears that the editor cannot handle the conversion for any character that has a "number code" but not an "entity code". If this is the case, I question the inclusion of characters in the Insert Special Character dialog that do not have entity codes.
comment:6 Changed 17 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Be sure that I'm correct richard.
The © or ® numeric entities are part of the named entities supported by FCKeditor. So, as a results, they are automatically converted to © or ® when outputting the editor data.
The ‛ or ► numeric entities instead have no named versions in the editor, so they are not automatically converted to entities.
As stated in my previous comment, you must use the AdditionalNumericEntities setting to indicate the additional characters that must be converted to numeric entities.
Hi!
I can only confirm it partially. When you insert special characters ‛ and ► in the source view and go to WYSIWYG view and back again you will find the actual characters instead of their numbers. This happens in IE as well as in FF2.
However when it is for replacing characters with a question mark I can't confirm it. In my case the output was
<p>‛ or ►</p>
which is of course wrong. because it should be<p>‛ or ►</p>
.So could you please chek if you have similar results using our demo page at:
http://www.fckeditor.net/demo
Thanks in advance.