Opened 18 years ago
Closed 17 years ago
#175 closed Bug (worksforme)
Percent sign in mailto: link breaks link tool
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.5 Beta |
Component: | General | Version: | FCKeditor 2.3.2 |
Keywords: | SF Confirmed IE7 | Cc: |
Description
I tested this on multiple versions of FCKeditor i have back to around 2.0 and all exhibit the same behavior.
I recreated this error like so:
- Open new FCKeditor and switch to source view.
- Enter html mailto: link where the email address contains a percent sign (we use % signs for macros). Example:
<a href="mailto:useruser%name@host.com">E-Mail me!</a>. here is more text.
- Switch back to html view.
- Select and try to link some of the other text, like the word "more" to a website. the dialog box comes up, lets you type in the url, and then when you save it, it throws a js error, and in your html code, it puts in javascript code like the following:
<a href="mailto:useruser%name@host.com">E-Mail me!</a>. here is <a href="javascript:void(0);/*1168555255689*/">more</a> text.
Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1633584&group_id=75348&atid=543653
Change History (18)
comment:1 Changed 18 years ago by
Reporter: | changed from Frederico Caldeira Knabben to aschwabe@… |
---|
comment:2 Changed 18 years ago by
Keywords: | WorksForMe Pending added |
---|
comment:3 Changed 18 years ago by
Ooops, I forgot to leave out that this is an IE7 specific issue. I have only been able to reproduce the error in IE7. We are using fckeditor for some custom built apps, and where this issue popped up is when we used macros for html code in a link. for example:
<a href="mailto:%user_email%">E-Mail Me</a>
Where %user_email% will be programmatically replaced later. Editing the above link in IE7 causes javascript errors, even through the pop-up window opens, on save the code gets mangled. Hoep this helps.
comment:4 Changed 18 years ago by
I've just tested it in the online demo (www.fckeditor.net/demo) with FF2, IE6 and IE7. It works well with all of them.
I've pasted the HTML in the source, switched to WYSIWYG edited the link, changing the address to "%test_email%". Switched back to source to check the code.
I had no errors and the code had the changes as expected.
Are you able to reproduce it with the online demo? Are you using the latest FCKeditor version?
comment:5 Changed 18 years ago by
I am able to reproduce this in the online editor.
Steps:
1) goto http://www.fckeditor.net/demo
2) Select some text (eg 'some') and click the anchor.
3) Enter '%variable%' into the link box
4) Click 'OK'
5) Select some other text (eg 'text') and click the anchor
6) Enter '%variable%' into the link box
7) Click 'OK'
I get a 'This property or method is not supported by this object' (freely translated from dutch, it may not be an accurate translation).
Extra info:
File: http://www.fckeditor.net/fckeditor/editor/fckdialog.html
Line number: 115
(Although the Microsoft Script debugger puts the cursor on line 116.
Function: Ok()
comment:6 Changed 18 years ago by
Even more extra info:
OS: Microsoft Windows XP Pro
Browser used: Internet Explorer 7.0.5730.11
No extra weird plugins
comment:7 follow-up: 10 Changed 18 years ago by
I can't reproduce that, using IE7/XP-SP2.
I followed the test case and it gives no errors. On submitting, the HTML comes out as:
<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p> <p>som<a name="_variable_"></a>e te<a name="_variable_"></a>xt</p>
which however doesn't seem correct - the% becomes _.
comment:8 Changed 18 years ago by
Following jasperroel's instructions I can reproduce the issue using IE7 (7.0.5730.11) on Win2k3 SP2 with all standard config.
The resulting code is:
<p>This is <a href="%variable%">some</a> <strong>sample <a href="javascript:void(0);/*1177509105515*/">text</a></strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
comment:9 follow-up: 13 Changed 18 years ago by
Replying to jasperroel:
Select some text (eg 'some') and click the anchor.
This ticket is related to mailto links containing percent chars. It has nothing to do with anchors. If needed, please open a dedicated ticket for it.
comment:10 Changed 18 years ago by
Replying to tallyce:
which however doesn't seem correct - the% becomes _.
This is the expected behavior. Invalid chars on anchor names are automatically replaced with underscores.
comment:11 Changed 18 years ago by
I still have no problems to create and edit mailto links containing percent chars.
comment:12 Changed 18 years ago by
By the way, I did just recreate the exact same error using the LINK tool, and specifying a mailto: link.
- highlight "some", click Insert/Edit Link button, change drop-down to E-Mail, and type %variable% in the email address field. Click OK -- this is accepted fine, no problems.
- highlight "text", click Insert/Edit Link button, change drop-down to E-Mail, and type %variable% in the email address field. Click OK -- this time gives me a JS error, and mangles the source code:
<p>This is <a href="mailto:%variable%">some</a> <strong>sample <a href="javascript:void(0);/*1177510131453*/">text</a></strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
comment:13 Changed 18 years ago by
Replying to fredck:
Replying to jasperroel:
Select some text (eg 'some') and click the anchor.
This ticket is related to mailto links containing percent chars. It has nothing to do with anchors. If needed, please open a dedicated ticket for it.
Sorry for the misunderstanding. I meant the 'globe with chain' button, two position to the left of the anchor button. Which is, I believe, what aschwabe is describing in comment 12.
The bug is still there:
1) goto http://www.fckeditor.net/demo
2) Select some text (eg 'some') and click the Insert/Edit button.
3) Enter '%' into the link box (you may choose E-mail and enter '%' into the address field))
4) Click 'OK'
5) Select some other text (eg 'text') and click the Insert/Edit button
6) Enter '%' into the link box ((you may choose E-mail and enter '%' into the address field)
7) Click 'OK'
In my test it doesn't matter if you select link, e-mail or whatever. The important thing seems te be the existence of a href with a % in it.
comment:14 Changed 18 years ago by
Keywords: | Confirmed IE7 added; WorksForMe Pending removed |
---|---|
Version: | → FCKeditor 2.3.2 |
Ok... I was finally able to reproduce it with IE7. Ok with IE6 and FF2. Sorry for any misunderstanding.
comment:15 Changed 18 years ago by
More findings on this...
The problem here seams to be the first link with % only. The error will happen if you first create a link with %, and then any other link with our without %.
Another "requirement"... the second link must be created "after" the link with %. If created before it, no errors will be thrown.
comment:17 Changed 18 years ago by
Milestone: | → FCKeditor 2.5 |
---|
comment:18 Changed 17 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I could reproduce this bug on FCKeditor 2.3.2, but I could no longer reproduce the bug in FCKeditor 2.4.3 or the SVN version. It seems to have been fixed for some time already.
Works for me with both IE6 and FF2. Tested with version 2.4 and SVN.
Are you using any special address when creating the link at "more"?