Opened 13 years ago

Closed 13 years ago

#16981 closed Bug (fixed)

Trac user highlighting breaks if you use a h3 heading in comment

Reported by: Luke Plant Owned by: nobody
Component: *.djangoproject.com Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

For example, here:

https://code.djangoproject.com/ticket/16937

Core developers (like me) are not highlighted due to the use of an 'h3' heading in comment 9.

The bug is in tickethack.js:

    var attribution_regex = /by ([\w\-]+)/;
    $('#changelog h3').each(function() { 
        users.push(this.innerHTML.match(attribution_regex)[1]);
    });

You get this error in JS console:

tickethacks.js:20 Uncaught TypeError: Cannot read property '1' of null

Changing the selector to '#changelog h3.change' will fix it.

Change History (2)

comment:1 by Julien Phalip, 13 years ago

Triage Stage: UnreviewedReady for checkin

I don't think this tickethack.js is available in the dp.com repo on github yet, but I think Jacob was planning to do that soon.

comment:2 by Aymeric Augustin, 13 years ago

Resolution: fixed
Status: newclosed

Fixed, thanks Luke.

Note: See TracTickets for help on using tickets.
Back to Top