Closed Bug 501159 Opened 15 years ago Closed 15 years ago

Trailing comma in tag is retained

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: krupa.mozbugs, Assigned: yem.huynh)

Details

(Whiteboard: [webmocha])

Attachments

(2 files)

Attached image comma
steps to reproduce:
1.Log in to your AMO account.
2.Navigate to any add-on page
3.Click on "Add a atg" link
4.Enter "test,blah," as tags and click add

expected result:
the redundant trailing comma is ignored

actual result:

Comma is also saved(see attached image)
Assignee: nobody → mikelee
I had the idea that  we should whack this along with trim()ing the tags, but making a special case for commas over other punctuation seems lame.  ->wontfix
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
we're delimiting on commas ->reopen
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Assignee: mikelee → expatrick
Whiteboard: [webmocha]
Assignee: expatrick → yem.huynh
This is already fixed, right?
(In reply to comment #3)
> This is already fixed, right?

Looks like this bug has turned into "trailing comma adds a blank tag" - for the record, a tag should never be blank.  Just make the split function remove anything that is blank.
Attached patch fixSplinter Review
ignore empty spaces. so the following:

,aaa,  ,bbb,  ,,,cccc,

will only create tags:

aaa
bbb
ccc
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
A similar patch is committed in r29326
verified
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: