Opened 3 years ago

Closed 3 years ago

#11698 closed Bug (fixed)

Latin chars not converted to HTML entities with following configurations

Reported by: nikos Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.4.1
Component: General Version: 4.3 Beta
Keywords: Cc:

Description

When creating editor in samples with following configurations, latin chars are not encoded as HTML entities

  1. Create editor with configurations like below

CKEDITOR.replace( 'editor1', {

allowedContent: true,
entities_latin: false,
entities_processNumerical: 'force',
fullPage: true

});

  1. Copy-paste HTML code to body where parent element has attribute contenteditable="true" and inner text/siblings contains latin chars, e.g. code below

<table> <tbody> <tr> <td contenteditable="true">ÅÖÄ</td> <td contenteditable="true">ÅÖÄ</td> </tr> </tbody> </table>

  1. Toggle to WYSIWYG and back

If one then removes contenteditable attribute in Source view or comments out the allowedContent property from config, latin chars are encoded properly.

Change History (6)

comment:1 Changed 3 years ago by nikos

I tested the case with previous version 4.0.x and it worked well there.

comment:2 Changed 3 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.4.1
Status: newconfirmed
Version: 4.3.34.3 Beta

This has been changed in CKEditor 4.3 when the Widgets system was introduced. The data processor cannot process nested editables because they need to be processed separately, since their data processor's settings may differ. Whether the rule is applied to nested editables and non-editable elements is controlled by options passed to filter.addRules.

In this case - the entities filter is not applied to nested editables. Otherwise it would be applied twice, because content of nested editables is processed separately, by the widgets system. However, you're not using widgets system, so nested editables are not processed at all.

Currently, the HTML filter stops filtering nested editable if it first found non-editable element (which is nested editable's ancestor of course). However, your case shows only <td> with contenteditable="true", which is not contained in non-editable element. This is a slightly different case, because this <td> is just a part of main editable and it does not create a new context. So in such case its content should be processed.

comment:3 Changed 3 years ago by Piotrek Koszuliński

Owner: set to Piotrek Koszuliński
Status: confirmedassigned

comment:4 Changed 3 years ago by Piotrek Koszuliński

Status: assignedreview

Pushed branch:t/11698 on dev and tests.

comment:5 Changed 3 years ago by Marek Lewandowski

Status: reviewreview_passed

This change solves the issue.

comment:6 Changed 3 years ago by Piotrek Koszuliński

Resolution: fixed
Status: review_passedclosed

Fixed on master with git:c523a9e on dev and c4f552e on tests.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy