Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10493 closed Task (invalid)

wired protected source

Reported by: sahel Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version:
Keywords: Cc: sahel@…

Description

Hi,

I am facing a problem currently.At present ckeditor can protect the php code but the problem is when it is written into a html tag problem arise. as for eaxmple

<a href="#" <?php echo ($count++ == 0)?'class="active"': ?> vid="<?php echo $id ?>" >something<a/> is working fine in source view when source view is default but in case of design mode the code changed to <a 3e--="" href="#">vid="<?php echo $id ?>something</a>

i don't know what is the reason,can you fix the issue please..

Thanking you.

Change History (3)

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

Keywords: protected_source removed
Resolution: invalid
Status: newclosed
Version: 3.6.4

Protected source cannot be inserted inside HTML tags. CKEditor, to preserve protected source, replaces it with HTML comments, so it can exist only in place were comments are allowed. There's no other way to solve this.

comment:2 Changed 6 years ago by sahel

I can't understand your suggestion.please explain with simple example.you say that no other way to solve this.so i need to disable protected source feature.so how can i disable whole protected source feature.

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

Simple example.

This source:

<a href="#" <?php echo ($count++ == 0)?'class="active"': ?> vid="<?php echo $id ?>" >

Is encoded by CKEditor's data processors (implementing source protection) into the:

<a href="#" <!--cke_protected_source{{{...}}}-> vid="<!--cke_protected_source{{{...}}}->" >

And this is not a correct HTML any more.

To disable source protection you need to set config.protectedSource to an empty array. But of course you also need to remove PHP from your HTML data.

If you've got more questions please ask them on http://ckeditor.com/forums.

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