Opened 14 years ago

Closed 12 years ago

#4967 closed Bug (invalid)

htmlEncodeOutput = true and jqueryadapter problem

Reported by: lisaj Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version: 3.1
Keywords: Discussion Cc:

Description (last modified by Alfonso Martínez de Lizarrondo)

This combination encode text in editor.

  1. In samples config.js set config.htmlEncodeOutput = true
  2. Go to jQuery adapter example
  3. Click Submit
  4. Go back
  5. Editor display encoded html

Change History (7)

comment:1 Changed 14 years ago by Alfonso Martínez de Lizarrondo

Description: modified (diff)
Version: 3.1

This is the kind of issue that I commented in http://dev.fckeditor.net/ticket/4708#comment:5

I think that the solution is to require that the input is also HTMLencoded if it must be returned that way from the editor.

comment:2 Changed 14 years ago by Frederico Caldeira Knabben

Component: GeneralCore : Output Data
Keywords: Discussion added

I'm ok with Alfonso's proposal. The only problem I see here is that the setting will not be compatible with existing content that's not encoded, eventually breaking entities present on it.

Is this situation acceptable?

comment:3 Changed 14 years ago by lisaj

In my aplication editor encode input on load. I create better example for my problem.

comment:4 in reply to:  2 Changed 14 years ago by Alfonso Martínez de Lizarrondo

Replying to fredck:

I'm ok with Alfonso's proposal. The only problem I see here is that the setting will not be compatible with existing content that's not encoded, eventually breaking entities present on it.

Is this situation acceptable?

The application must be coded to accept encoded output, so the same adapter that takes care of it should be able to prefill the textarea double-encoding the input and that way nothing should break.

comment:5 Changed 14 years ago by lisaj

My mistake. I started a new tickets which better describes my problem Tickets: #4985

comment:6 Changed 14 years ago by Alfonso Martínez de Lizarrondo

I've closed that ticket because it's just the same problem. You are requesting to fill the textarea with encoded output and then you reuse that to fill a new instance, so logically the new content is now encoded.

In this situation, you shouldn't set htmlEncodeOutput, and manually do it yourself before sending the data to the server.

comment:7 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

I agree with @alfonsoml:

Docs for htmlEncodeOutput say:

Whether to escape HTML when the editor updates the original input element.

(http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.htmlEncodeOutput)

The way I see it is that right before sending editor contents to server value of textarea is being updated with encoded HTML. When user clicks back button this last known value (encoded HTML) is being restored. I see no error here.

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