Opened 6 years ago

Closed 6 years ago

#5646 closed Bug (fixed)

CK 3.2.1 protected source problem

Reported by: lhinderks Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.4.2
Component: Core : Output Data Version: 3.0
Keywords: Cc:

Description

The protectedsource feature seems to give strange results when the protected source is inside a span. Below are 2 examples of problems. In the first example below, the CKEDITOR removed the span tags. In the second case, the CKEDITOR moved some of the protected text outside of the span. If you try various combinations of protected text and spans you seem to get strange results.

  1. Set the config file to protect <? ... ?> things by placing the following code in the config.js file (from the ckeditor api docs).

config.protectedSource.push(/<\?[\s\S]*?\?>/g);

  1. In the editor (3.2.1) type the following in the source mode.

<p>abc<span><?def?></span></p>

  1. Go to WYSIWYG mode and then back to source mode and you will see the following. Notice the spans are gone. The protected source remains intact.

<p>

abc<?def?></p>

  1. Now try typing the following in the source mode.

<p>abc def<span><?php stuff a?>ghi -- lmn<?php stuff b?></span>xyz</p>

  1. Go to WYSIWYG mode and back to source mode and notice how some of the protected text (<?php stuff a?>) is moved outside the span.

<p>

abc def<?php stuff a?><span>ghi -- lmn<?php stuff b?></span>xyz</p>

Attachments (1)

5646.patch (395 bytes) - added by garry.yao 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by garry.yao

comment:1 Changed 6 years ago by garry.yao

  • Component changed from General to Core : Output Data
  • Keywords Confirmed Review? added
  • Milestone set to CKEditor 3.4
  • Owner set to garry.yao
  • Status changed from new to assigned
  • Version changed from 3.2.1 to 3.0

comment:2 Changed 6 years ago by garry.yao

Ticket Test added:
run OR view source.

comment:3 Changed 6 years ago by fredck

  • Milestone changed from CKEditor 3.4 to CKEditor 3.5

comment:4 Changed 6 years ago by Saare

  • Keywords Confirmed removed
  • Status changed from review to review_passed

comment:5 Changed 6 years ago by garry.yao

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [5946].

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