Make WordPress Core

Changeset 63664


Ignore:
Timestamp:
09/17/2026 05:33:45 PM (4 weeks ago)
Author:
desrosj
Message:

Themes: Escape the theme installer preview route value.

Merges r63658 to the 7.1 branch.

Props xknown, villanovachile, jorbin, jonsurrell.

Location:
branches/7.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/7.1

  • branches/7.1/src/js/_enqueues/wp/theme.js

    r62878 r63664  
    20832083                                self.view.collection.trigger( 'update' );
    20842084
    2085                                 // Open the theme preview.
     2085                                // Open the theme preview. The slug comes from the URL, so escape it.
    20862086                                self.view.collection.once( 'query:success', function() {
    2087                                         $( 'div[data-slug="' + slug + '"]' ).trigger( 'click' );
     2087                                        $( 'div.theme[data-slug="' + $.escapeSelector( slug ) + '"]' ).trigger( 'click' );
    20882088                                });
    20892089
Note: See TracChangeset for help on using the changeset viewer.