Making WordPress.org

Changeset 3141


Ignore:
Timestamp:
05/14/2016 12:41:21 PM (9 years ago)
Author:
ocean90
Message:

Trac: Don't link mentions in HTML attributes.

Props SergeyBiryukov.
Fixes #1541.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

    r2916 r3141  
    108108                        }
    109109
     110                        var matchInAttr = new RegExp( '=".*' + match + '.*"' );
     111                        if ( matchInAttr.test( $comment ) ) {
     112                            return match;
     113                        }
     114
    110115                        var meClass = ( username === wpTrac.currentUser ) ? ' me' : '';
    111116                        return pre + '<a class="mention' + meClass + '" href="https://profiles.wordpress.org/' + username + '">@' + username + '</a>';
Note: See TracChangeset for help on using the changeset viewer.