WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35032, comment 7


Ignore:
Timestamp:
06/15/2016 09:21:33 AM (4 years ago)
Author:
obenland
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35032, comment 7

    initial v1  
    1 @adamsilverstein I installed the plugin you shared. Updates are failing if the value of the data-slug attribute contains special characters. This is because the shiny-updates.js as well as the default wordpress admin script updates.js are both making use of the value in the data-slug attribute as a jQuery selector string without escaping it first. jQuery selector strings with special characters have to prefix the special char with a \\ before it can be used in the string. If shiny-updates.js and the core admin script updates.js were changed to let the jQuery handle special characters, it might work.
     1@adamsilverstein I installed the plugin you shared. Updates are failing if the value of the data-slug attribute contains special characters. This is because the shiny-updates.js as well as the default wordpress admin script updates.js are both making use of the value in the data-slug attribute as a jQuery selector string without escaping it first. jQuery selector strings with special characters have to prefix the special char with a `\\` before it can be used in the string. If shiny-updates.js and the core admin script updates.js were changed to let the jQuery handle special characters, it might work.
    22
    33That would involve doing something like `slug = slug.replace(/([^A-Za-z0-9_\-])/g,"\\$1" )` throughout the js anywhere a slug is used in a jQuery selector string.