Closed Bug 469102 Opened 12 years ago Closed 12 years ago

Places Tag Autocomplete breaks with certain tags (Regex escaping)

Categories

(Toolkit :: Places, defect, P2)

1.9.1 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla1.9.1b3

People

(Reporter: ts.bugzilla, Assigned: dietrich)

References

Details

(Keywords: verified1.9.1)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20081210 Firefox/3.0.4
Build Identifier: 

I seem to have a tag that breaks the autocomplete (I was very surprised to see
the bug 415960 being marked "fixed 1.9.1", as I've never seen any tag autocompletion).

Reproducible: Always

Steps to Reproduce:
1. Tag a page with "c++", additional tags should be stored to have something to autocomplete...
2. Try to edit tags for any bookmark, e.g. in Library or the dialog invoked from a bookmark's "Properties..." context menu entry.
3. No tag autocompletion appears...



Error in the Error Console:

Error: invalid quantifier +$|c++(,|;))
Source File: file:/// ... /components/nsTaggingService.js
Line: 490

The string "c++" is one of my tags, it seems to be built into a regex, which is hence rendered invalid.

about:buildconfig:
Built from http://hg.mozilla.org/releases/mozilla-1.9.1/rev/9269759f81b7
Note that I use a user agent override, I did not really use "Firefox 3.0.4", as Bugzilla claims.
Blocks: 415960
confirmed on latest trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → 1.9.1 Branch
drivers: this easily breaks tag autocomplete, and should be a very low risk fix. requesting blocking.
Flags: blocking1.9.1?
Priority: -- → P2
Target Milestone: --- → mozilla1.9.1b3
Flags: blocking1.9.1? → blocking1.9.1+
Assignee: nobody → dietrich
Attached patch v1Splinter Review
removed regexp entirely. this should be faster as well.
Attachment #353543 - Flags: review?(mak77)
Whiteboard: [has patch][needs review marco]
Comment on attachment 353543 [details] [diff] [review]
v1

r=mak77
Attachment #353543 - Flags: review?(mak77) → review+
Status: NEW → ASSIGNED
Whiteboard: [has patch][needs review marco] → [has review]
http://hg.mozilla.org/mozilla-central/rev/ea93a49fd65d
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Verified with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20081222 Minefield/3.2a1pre ID:20081222020443

Looks like everything is ok with the patch. Can we get it into the 1.9.1 branch?
Status: RESOLVED → VERIFIED
Whiteboard: [has review]
Target Milestone: mozilla1.9.1b3 → mozilla1.9.2a1
(In reply to comment #7)
> Looks like everything is ok with the patch. Can we get it into the 1.9.1
> branch?

i'll push a bundle of current approved Places patches to 1.9.1 most likely tomorrow.
Verified on 1.9.1 with:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081224 Shiretoko/3.1b3pre ID:20081224020421

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20081224 Shiretoko/3.1b3pre ID:20081224042714
Target Milestone: mozilla1.9.2a1 → mozilla1.9.1b3
You need to log in before you can comment on or make changes to this bug.