Make WordPress Core

Changeset 63658


Ignore:
Timestamp:
09/17/2026 05:26:12 PM (7 weeks ago)
Author:
adamsilverstein
Message:

Themes: Escape the theme installer preview route value.

Props xknown, villanovachile, jorbin, jonsurrell.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/theme.js

    r63600 r63658  
    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.