Opened 15 years ago

Closed 14 years ago

Last modified 10 years ago

#4880 closed Bug (fixed)

CKEditor changes tag style inside html comment with cke_protected

Reported by: fabio Owned by: Alfonso Martínez de Lizarrondo
Priority: Normal Milestone: CKEditor 3.5.3
Component: Core : Output Data Version: 3.0.2
Keywords: Cc: fabio, dean@…, vgarikipati@…

Description

Paste the following content in source mode, switch to WYSIWYG and back to source.

<style type="text/css">
<!--
.bloco1_titulo { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; font-weight:bold; background-color:#333366; padding-left:10px; }
-->
</style>

Result:

<p>
	<style type="text/css">
<!--{cke_protected}%3C!%2D%2D%0A.bloco1_titulo%20%7B%20font-family%3AVerdana%2C%20Arial%2C%20Helvetica%2C%20sans-serif%3B%20font-size%3A10px%3B%20color%3A%23FFFFFF%3B%20font-weight%3Abold%3B%20background-color%3A%23333366%3B%20padding-left%3A10px%3B%20%7D%0A%2D%2D%3E-->
</style></p>

Expected result: No change

Each time you click on source button, the result grows!

Change History (9)

comment:1 Changed 15 years ago by fabio

If paste this source (without html comment tag), this error doesn't happen

<style type="text/css">
.bloco1_titulo { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; font-weight:bold; background-color:#333366; padding-left:10px; }
</style>

comment:2 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added
Priority: HighNormal

comment:3 Changed 15 years ago by Alfonso Martínez de Lizarrondo

Owner: set to Alfonso Martínez de Lizarrondo
Status: newassigned

comment:4 Changed 15 years ago by Dean Harding

Cc: dean@… added

Just a comment to say this affects us as well. We just upgraded from FCKeditor 2.x and a client noticed that their styles had stopped working (they had manually entered them in source view before). The workaround is easy enough, and I'll look at manually applying that patch to our code, but this is just to say "me too".

We love CKeditor otherwise, though... just had to say that :)

comment:5 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:6 Changed 14 years ago by Wiktor Walc

Milestone: CKEditor 3.5.2

comment:7 Changed 14 years ago by Sa'ar Zac Elias

Cc: vgarikipati@… added
Keywords: Confirmed removed

#6922 is a dup.

comment:8 Changed 14 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed by #4475.

comment:9 Changed 10 years ago by Guest

I am using the latest ckeditor 4.1 version and I am facing the same problem where my input html has style with comments and this style gets converted to cke_protected and style does not have any effect.

Input HTML: <html> <style>

<!--

.headertop1 {

width: 100%;

}

.headercontent {

color: #000000;

font-family: verdana;

font-size: 16pt;

} --> </style> </html>

And adding in ckeditor this gets converted to

<style>

<!--{cke_protected}{C}%3C!%2D%2D%0A%0A.headertop1%20%7B%0A%0A%20%20width%3A%20100%25%3B%0A%0A%7D%0A%0A.headercontent%20%7B%0A%0A%20%20color%3A%20%23000000%3B%0A%0A%20%20font-family%3A%20verdana%3B%0A%0A%20%20font-size%3A%2016pt%3B%0A%0A%7D%0A%0A%2D%2D%3E--></style>

Expected result: I want the styles to get applied but I cannot change the input html.

Last edited 10 years ago by Guest (previous) (diff)
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