Opened 4 years ago

Closed 3 years ago

#16981 closed Bug (fixed)

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

Reported by: lukeplant 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 Changed 4 years ago by julien

  • Triage Stage changed from Unreviewed to Ready 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 Changed 3 years ago by aaugustin

  • Resolution set to fixed
  • Status changed from new to closed

Fixed, thanks Luke.

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