Update/Install error messages: do not escape from the template, escape the error message string before inserting it.
Props swissspidy, ocean90. Fixes #37623 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@38240 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a9717f8ef0
commit
a0a6262f17
@ -631,7 +631,7 @@ function maintenance_nag() {
|
|||||||
function wp_print_admin_notice_templates() {
|
function wp_print_admin_notice_templates() {
|
||||||
?>
|
?>
|
||||||
<script id="tmpl-wp-updates-admin-notice" type="text/html">
|
<script id="tmpl-wp-updates-admin-notice" type="text/html">
|
||||||
<div <# if ( data.id ) { #>id="{{ data.id }}"<# } #> class="notice {{ data.className }}"><p>{{ data.message }}</p></div>
|
<div <# if ( data.id ) { #>id="{{ data.id }}"<# } #> class="notice {{ data.className }}"><p>{{{ data.message }}}</p></div>
|
||||||
</script>
|
</script>
|
||||||
<script id="tmpl-wp-bulk-updates-admin-notice" type="text/html">
|
<script id="tmpl-wp-bulk-updates-admin-notice" type="text/html">
|
||||||
<div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">
|
<div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">
|
||||||
|
@ -1608,7 +1608,7 @@
|
|||||||
wp.updates.addAdminNotice( {
|
wp.updates.addAdminNotice( {
|
||||||
id: 'unknown_error',
|
id: 'unknown_error',
|
||||||
className: 'notice-error is-dismissible',
|
className: 'notice-error is-dismissible',
|
||||||
message: errorMessage
|
message: _.escape( errorMessage )
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// Remove the lock, and clear the queue.
|
// Remove the lock, and clear the queue.
|
||||||
|
Loading…
Reference in New Issue
Block a user