Opened 17 years ago

Closed 17 years ago

#268 closed Bug (fixed)

& in Javascript being converted to '

Reported by: Alan Zebchuk Owned by:
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: General Version: FCKeditor 2.4
Keywords: Confirmed Cc:

Description

If you enter a link such as the following in the source view:

<a title="My Page" onClick="pop('/page?id=212&do=something', 372, 445); return false;" href="#">Test</a>

and then goto the preview mode and back to the source, you will find that the editor has changed the link to the following:


<a title="My Page" onClick="pop('/page?id=212'do=something', 372, 445); return false;" href="#">Test</a>

Change History (10)

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

#461 has been marked as dup

comment:2 Changed 17 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.5

Confirmed with FF2.

With IE6, & are converted to &amp; instead... is this conversion acceptable?

But always with IE, when switching multiple times to source, the & get duplicated.

It happens only because those are event attributes.

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added

comment:4 Changed 17 years ago by Martin Kou

Fixed with [427].

Click here for more info about our SVN system.

comment:5 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: newclosed

Oops... [427] does not work in Internet Explorer, I've committed another change set [428] to fix that. Now it should work across Gecko, IE, Safari and Opera.

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

These changes broke the handling of popup windows in the link dialog. [443] should fix it.

comment:7 Changed 17 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: closedreopened

Wouldn't encodeURIComponent and decodeURIComponent be enough to fix it, avoiding us to introduce the custom hex translation code?

This is what we have after encoding it with encodeURIComponent:

pop('%2Fpage%3Fid%3D212%26do%3Dsomething'%2C%20372%2C%20445)%3B%20return%20false%3B%2C%2F%3F%3A%40%26%3D%2B%24%23 

Reopening just to check it.

comment:8 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: reopenedclosed

I've performed some tests and it seems encodeURIComponent() and decodeURIComponent() works pretty well. [703] changes the encoding and decoding logic to use the simpler approach.

comment:9 Changed 17 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: closedreopened

Martin, please take a look at [427] and [443] (taken from the comments in this ticket). It seams that some other parts of the code must be cleaned, modified.

comment:10 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: reopenedclosed

The code related to the links with popup targets in [443] is already cleaned up in [703]. There's still some leftover code from [427] (in FCKListsLib), though. I've removed it in [707].

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