Opened 13 years ago

Closed 10 years ago

Last modified 10 years ago

#8216 closed Bug (fixed)

Source protection doesn't work properly in some cases

Reported by: Wiktor Walc Owned by:
Priority: Normal Milestone: CKEditor 4.3.4
Component: General Version: 3.5.2
Keywords: Cc: contact@…

Description

The default protection of <SCRIPT> tags and comments doesn't seem to work properly in certain cases, when <SCRIPT> tag is followed by a comment.

Steps to reproduce

  1. Paste the following source code:
<p>
<SCRIPT LANGUAGE="JavaScript">
//'
</SCRIPT><!-- comment --><SCRIPT LANGUAGE="JavaScript">
//'
</SCRIPT></p>
  1. Switch to wysiwyg mode and back
  2. Result: code is changed into:
    <p>
    <SCRIPT LANGUAGE="JavaScript">
    //'
    </SCRIPT>{C}{C}{C}<!-- comment --><SCRIPT LANGUAGE="JavaScript">
    //'
    </SCRIPT></p>
    

(an extra {C} is added everytime when swiching to source and back). Also an extra text {cke_protected_1} is displayed in wysiwyg mode.

Note: it is a reduced example made from a more complicated sample taken from a live website.

Change History (9)

comment:1 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 3.5.2

This issue has been reproducible from rev [6457].

NOTE: [6457] is from CKE 3.5.2 but if you check release versions you will be able to reproduce this issue from CKE 3.5.3. Maybe this rev was simply not included in 3.5.2. Anyway I have set 3.5.2 version.

comment:2 Changed 12 years ago by Jakub Ś

Another example from #8402 which was marked as duplicate.

<a href="http://en.wikipedia.org/wiki/Fairy_tale/<!--#echo var='DOCUMENT_NAME' -->" title="Fairy tale">fairy tale</a>

comment:3 Changed 12 years ago by Jakub Ś

#7805 - different issue but also concerns {C} being inserted.

comment:4 Changed 12 years ago by Jakub Ś

Other related to problems with HTML comments: #8732, #8569, #8640, #8129, #6709, #8812, #8402.

Last edited 10 years ago by Jakub Ś (previous) (diff)

comment:5 Changed 12 years ago by Jakub Ś

Patch from #9205 fixes this problem.

comment:6 Changed 12 years ago by Jakub Ś

#9347 was marked as duplicate.

comment:7 Changed 11 years ago by Piotrek Koszuliński

Adding myself to CC.

comment:8 Changed 10 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.3.4
Resolution: fixed
Status: confirmedclosed

Fixed by #9205.

comment:9 Changed 10 years ago by Piotrek Koszuliński

I reopened #8402 which has not been fixed by #9205, so it wasn't an exact duplicate of this issue.

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