Opened 15 years ago
Closed 13 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 )
This combination encode text in editor.
- In samples config.js set config.htmlEncodeOutput = true
- Go to jQuery adapter example
- Click Submit
- Go back
- Editor display encoded html
Change History (7)
comment:1 Changed 15 years ago by
Description: | modified (diff) |
---|---|
Version: | → 3.1 |
comment:2 follow-up: 4 Changed 15 years ago by
Component: | General → Core : 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 15 years ago by
In my aplication editor encode input on load. I create better example for my problem.
comment:4 Changed 15 years ago by
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 15 years ago by
My mistake. I started a new tickets which better describes my problem Tickets: #4985
comment:6 Changed 15 years ago by
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 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.
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.