WordPress.org

Making WordPress.org

Changeset 9143


Ignore:
Timestamp:
09/19/2019 08:04:40 AM (15 months ago)
Author:
SergeyBiryukov
Message:

Trac: Update mentionsRegEx to remove forward slash from characters allowed in a username, e.g. @wordpress/a11y should not be linked.

File:
1 edited

Legend:

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

    r9080 r9143  
    113113        linkMentions: function( selector ) {
    114114            // See https://github.com/regexps/mentions-regex/blob/master/index.js#L21
    115             var mentionsRegEx = /(^|[^a-zA-Z0-9_@!@#$%&*])(?:(?:@|@)(?!\/))([a-zA-Z0-9/_\-.]{1,20})(?:\b(?!@|@)|$)/g,
     115            var mentionsRegEx = /(^|[^a-zA-Z0-9_@!@#$%&*])(?:(?:@|@)(?!\/))([a-zA-Z0-9_\-.]{1,20})(?:\b(?!@|@)|$)/g,
    116116                mentionsInAttrRegEx = new RegExp( '="[^"]*?' + mentionsRegEx.source + '[\\s\\S]*?"' );
    117117
Note: See TracChangeset for help on using the changeset viewer.