Ticket #4967 (closed Bug: invalid)

Opened 5 years ago

Last modified 2 years ago

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 alfonsoml) (diff)

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

comment:1 Changed 5 years ago by alfonsoml

  • Version set to 3.1
  • Description modified (diff)

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 follow-up: ↓ 4 Changed 5 years ago by fredck

  • Keywords Discussion added
  • Component changed from General to Core : Output Data

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 5 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 5 years ago by alfonsoml

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 5 years ago by lisaj

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

comment:6 Changed 5 years ago by alfonsoml

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 2 years ago by j.swiderski

  • Status changed from new to closed
  • Resolution set to invalid

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy