Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#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)

5447.patch (503 bytes) - added by Garry Yao 14 years ago.
5447_2.patch (392 bytes) - added by Teresa Monahan 12 years ago.

Download all attachments as: .zip

Change History (12)

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

Keywords: Confirmed added
Milestone: CKEditor 3.4

The anchor dialog should validate that the provided anchor name is valid

Changed 14 years ago by Garry Yao

Attachment: 5447.patch added

comment:2 Changed 14 years ago by Garry Yao

Component: GeneralUI : Dialogs
Keywords: Review? added
Owner: set to Garry Yao
Status: newassigned
Version: 3.0

comment:3 Changed 14 years ago by Alfonso Martínez de Lizarrondo

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 Changed 14 years ago by Frederico Caldeira Knabben

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 in reply to:  4 Changed 12 years ago by Teresa Monahan

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 12 years ago by Teresa Monahan

Attachment: 5447_2.patch added

comment:6 Changed 12 years ago by Garry Yao

Status: review_failedreview_passed

comment:7 Changed 12 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [7507].

comment:8 Changed 12 years ago by Teresa Monahan

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:9 Changed 12 years ago by Garry Yao

Sorry, wrong patch committed, re-fixed with [7514].

comment:10 Changed 12 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.6.4
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