Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10976 closed Bug (invalid)

Submitted data encoded incorrect when htmlEncodeOutput = true

Reported by: Thomas C. Thomsen Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

It seems that the submitted data is not always encoded correct when htmlEncodeOutput is set to true.

For example < is encoded into &lt; which is correct, where as æ is converted into aelig; which is not correct (notice the missing prefix & in aelig;).

Change History (6)

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

Status: newpending

Using replacebycode.html sample (with htmlEncodeOutput option added there), I've got following when submitting data:

&lt;p&gt;&amp;szlig;&lt;/p&gt;

Which is correct.

How do you test it?

comment:2 Changed 6 years ago by Thomas C. Thomsen

I am testing up against asp.net app and æ is encoded into aelig; - could you try to submit "foo bar æøå" and post the submitted data?

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

&lt;p&gt;foo bar &amp;aelig;&amp;oslash;&amp;aring;&lt;/p&gt;

I'll ask my colleague if he can test it on ASP.NET. But it definitely works well on PHP.

comment:4 Changed 6 years ago by Thomas C. Thomsen

Thanks a lot for your help.

I now realize that my string is being escaped twice (&aelig; becomes &amp;aelig;).

I just do a replace("&amp;", "&") and all is well. Thanks again

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

Resolution: invalid
Status: pendingclosed
Version: 4.2.1

comment:6 Changed 6 years ago by Jakub Ś

I now realize that my string is being escaped twice (&aelig; becomes &amp;aelig;).

Could you explain in more detail?

  1. Which editor you use - do you use CKEditor asp.net or CKEditor JS only in ASP.net application
  2. Why string is escaped twice. What escapes it second time? You have given JS method replace("&amp;", "&") as solution. Is there another JS escaping this HTML?
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy