Opened 14 years ago

Closed 13 years ago

#5646 closed Bug (fixed)

CK 3.2.1 protected source problem

Reported by: Larry Hinderks 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 14 years ago.

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by Garry Yao

Attachment: 5646.patch added

comment:1 Changed 14 years ago by Garry Yao

Component: GeneralCore : Output Data
Keywords: Confirmed Review? added
Milestone: CKEditor 3.4
Owner: set to Garry Yao
Status: newassigned
Version: 3.2.13.0

comment:2 Changed 14 years ago by Garry Yao

Ticket Test added:
run OR view source.

comment:3 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4CKEditor 3.5

comment:4 Changed 13 years ago by Sa'ar Zac Elias

Keywords: Confirmed removed
Status: reviewreview_passed

comment:5 Changed 13 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [5946].

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