#5447 closed Bug (fixed)
Anchorname with a blank at the end
Reported by: | crosscut | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6.4 |
Component: | UI : Dialogs | Version: | 3.0 |
Keywords: | Confirmed, IBM | Cc: | monahant@… |
Description
A Link doesnt jump to an anchor which name ends with a blank. Only tested with the ckeditor vers. 3.2.5205 and firefox vers 3.6.3.
Attachments (2)
Change History (12)
comment:1 Changed 15 years ago by
Keywords: | Confirmed added |
---|---|
Milestone: | → CKEditor 3.4 |
Changed 15 years ago by
Attachment: | 5447.patch added |
---|
comment:2 Changed 15 years ago by
Component: | General → UI : Dialogs |
---|---|
Keywords: | Review? added |
Owner: | set to Garry Yao |
Status: | new → assigned |
Version: | → 3.0 |
comment:3 Changed 15 years ago by
The patch doesn't allow a single letter name, but I think that it should be valid. Also, as we aren't interested in the details it should be enough to use test instead of match:
if ( !(/^[A-Za-z][-A-Za-z0-9_:.]*$/.this.getValue()) )
(untested)
comment:4 follow-up: 5 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Milestone: | CKEditor 3.4 |
The provided patch will show the "Please type the anchor name" message in this case, and the user will get confused.
Let's simply trim the spaces from the name, as users may not notice that they are there, being again confused.
If validation is to be done, other than trimming, a dedicated error message should be displayed. This is not a requirement for this ticket though.
comment:5 Changed 13 years ago by
Cc: | monahant@… added |
---|---|
Keywords: | IBM added |
As per comment:4, I believe trimming the spaces would be enough here. See proposed solution in the attached patch.
Changed 13 years ago by
Attachment: | 5447_2.patch added |
---|
comment:6 Changed 13 years ago by
Status: | review_failed → review_passed |
---|
comment:7 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [7507].
comment:8 Changed 13 years ago by
The provided fix does not seem like a good solution for this. With this fix, if the user includes spaces at the end of their anchor name, they get prompted with the message 'Please type the anchor name'. This is confusing for the user as they do not know what is wrong with the name they have already entered.
A better approach would be to trim the anchor name before it is committed as proposed in 5447_2.patch.
comment:10 Changed 13 years ago by
Milestone: | → CKEditor 3.6.4 |
---|
The anchor dialog should validate that the provided anchor name is valid