Update: Looks like this is an issue with MySQL character sets. I haven't fully wrapped my head around it, but it seems my default character set is latin1. However, it looks like djangocms_text_ckeditor.html.clean_html <https://github.com/divio/djangocms-text-ckeditor/blob/3.4.0/djangocms_text_ckeditor/html.py#L52-L66> (called from Text.save()) converts HTML entities to their respective encodings, which results in Unicode characters, which resulted in an error from MySQL. I found some guidance <https://code.djangoproject.com/ticket/13919> on changing the character set to utf8 for a single column, which resolved this issue. It looks like fixing my entire database is more involved.
On Monday, March 6, 2017 at 9:39:05 AM UTC-5, Brian Rutledge wrote: > > I don't think that's what's happening. First, I'm using the same font on > my website and in CKEditor. In CKEditor's "Source" view, when I enter > ✓, switching back to the WYSIWG view renders the checkmark. > However, it looks like the text that gets stored in the database is ?, so > subsequent edits of the Text plugin show that character. > > I see similar behavior from entities like ← and ′. However, > for more common entities like ©, it looks like there's an encoding > step somewhere, because the value in the database is \xa9. > > I know CKEditor has some settings related to handling entities, and > djangocms-text-ckeditor does its own sanitization using html5lib, but I > don't know if/how those things are resulting in this behavior. > > On Monday, March 6, 2017 at 3:15:16 AM UTC-5, Sacha Müller Philipps Sohn > wrote: >> >> You are refering to UTF-8 Symbols. It could be that the Font used in >> ckEditor supports this chararcter thus it gets properly displayed. The font >> used on your website might differ fro ckeditors font and might not support >> this character. As soon as a character isnt in the charset of a font it >> gets rendered as a questionmark. >> >> Am Freitag, 3. März 2017 21:13:44 UTC+1 schrieb Brian Rutledge: >>> >>> I'm trying to insert a "✓" (check mark >>> <http://htmlarrows.com/symbols/check-mark/>) in a >>> djangocms-text-ckeditor plugin. I've tried pasting it, and entering both >>> ✓ and ✓ in the "Source" view. No matter what method I use, >>> CKEditor renders that character, but when I save the plugin, the character >>> gets changed to "?". I've played around with various settings suggested by >>> https://github.com/divio/djangocms-text-ckeditor#configurable-sanitizer, >>> to no avail. >>> >>> Any thoughts? >>> >>> Thanks, >>> Brian >>> >> -- Message URL: https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id Unsubscribe: send a message to django-cms-developers+unsubscr...@googlegroups.com --- You received this message because you are subscribed to the Google Groups "django CMS developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-cms-developers+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/django-cms-developers/f6d87f17-cdca-43d8-b26d-12b0b7b2f1cb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.