Ticket #268 (closed Bug: fixed)
& in Javascript being converted to '
| Reported by: | azebchuk | 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
comment:2 Changed 6 years ago by fredck
- Milestone set to FCKeditor 2.5
Confirmed with FF2.
With IE6, & are converted to & 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:4 Changed 6 years ago by martinkou
Fixed with [427].
Click here for more info about our SVN system.
comment:5 Changed 6 years ago by martinkou
- Status changed from new to closed
- Resolution set to fixed
comment:6 Changed 6 years ago by alfonsoml
These changes broke the handling of popup windows in the link dialog. [443] should fix it.
comment:7 Changed 6 years ago by fredck
- Status changed from closed to reopened
- Resolution fixed deleted
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 6 years ago by martinkou
- Status changed from reopened to closed
- Resolution set to fixed
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.

#461 has been marked as dup