Ticket #6645 (closed Bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Double quotes in the content are always encoded

Reported by: alfonsoml Owned by: alfonsoml
Priority: Normal Milestone: CKEditor 3.5.1
Component: Core : Output Data Version:
Keywords: Cc:

Description

The entities plugin defines the &quot; as a core html entity, so it's not possible to disable this behavior, but I think that there's no real problem if " are used in a document (opposed to what happens with < and >)

Here's a report http://cksource.com/forums/viewtopic.php?f=11&t=20647 but I think that there might be other people with the same problem that we haven't noticed previously.

Attachments

6645.patch (888 bytes) - added by alfonsoml 3 years ago.
Proposed patch

Change History

Changed 3 years ago by alfonsoml

Proposed patch

comment:1 Changed 3 years ago by alfonsoml

  • Status changed from new to review
  • Owner set to alfonsoml

comment:2 Changed 3 years ago by garry.yao

  • Status changed from review to review_failed
  • Milestone set to CKEditor 3.5.1

Ampersand is also affected.

comment:3 Changed 3 years ago by alfonsoml

  • Status changed from review_failed to review

Ampersand is quite different.

The browser already send us the escaped string, the entities plugin doesn't perform any operation here.

If someone writes &amp; and we don't escape the '&', in the source it will be again "&amp;" instead of "&amp;amp;", so when it's reloaded or shown in a web page, it will be just "&" instead of "&amp;" as it was written.

In http://cksource.com/forums/viewtopic.php?p=52322#p52322 and the like, people just want to prevent the conversion in URLs, not understanding that this is the correct way to write in HTML, but in any case, it's not part of the entities plugin.

comment:4 Changed 3 years ago by wwalc

Just a note that I've received request from other user regarding stopping CKEditor from converting ampersands into entities.

comment:5 Changed 3 years ago by alfonsoml

But are we sure that they want to preserve ampersands in the contents or just in attributes (urls)?

In the docs page the entry for CKEDITOR.config.forceSimpleAmpersand was missing, so that might be the confusion.

I think that if we try to keep ampersands as & in the contents that will lead to problems, so I would rather open a dedicated ticket to it and then check why it's needed and how it can be done.

comment:6 Changed 3 years ago by garry.yao

Ok, it's enough if we have "forceSimpleAmpersand", the documentation is fixed with [6106].

comment:7 Changed 3 years ago by wwalc

I've just got a confirmation from a user that the reported problem was in encoding ampersands in urls, so forceSimpleAmpersand should be fine for it.

comment:8 Changed 3 years ago by Saare

  • Status changed from review to review_passed

comment:9 Changed 3 years ago by alfonsoml

  • Status changed from review_passed to closed
  • Resolution set to fixed

Fixed with [6285]

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