Making WordPress.org

Changeset 1344


Ignore:
Timestamp:
02/27/2015 04:39:09 PM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Sanitize tag names to be usable in URLs.

Fixes #891.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js

    r1314 r1344  
    232232            // Make tags click-able and separated by a comma.
    233233            data.tags = _.map( data.tags, function( tag ) {
    234                 return '<a href="' + wp.themes.data.settings.adminUrl + wp.themes.router.baseUrl( 'tags/' + tag ) + '">' + tag + '</a>';
     234                return '<a href="' + wp.themes.data.settings.adminUrl + wp.themes.router.baseUrl( 'tags/' + tag.toLowerCase().replace( ' ', '-' ) ) + '">' + tag + '</a>';
    235235            }).join( ', ' );
    236236
Note: See TracChangeset for help on using the changeset viewer.