Opened 18 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 18 years ago by
comment:2 Changed 18 years ago by
Milestone: | → 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:3 Changed 18 years ago by
Keywords: | Confirmed added |
---|
comment:5 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 Changed 17 years ago by
These changes broke the handling of popup windows in the link dialog. [443] should fix it.
comment:7 Changed 17 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
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
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:10 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
#461 has been marked as dup