Media: Display the unsaved changes dialog in image edit form using jQuery .text() function.

This ensures that HTML entities like non-breaking spaces are properly displayed instead of being encoded.

Props jdy68, sebastienserre, audrasjb, mukesh27, SergeyBiryukov.
Fixes #54232.
Built from https://develop.svn.wordpress.org/trunk@51907


git-svn-id: http://core.svn.wordpress.org/trunk@51500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-10-15 00:18:56 +00:00
parent 000a1202ad
commit 8b8b5d8ecc
3 changed files with 3 additions and 3 deletions

View File

@ -893,7 +893,7 @@
pop = this.intval( $('#imgedit-undone-' + postid).val() );
if ( pop < history.length ) {
if ( confirm( $('#imgedit-leaving-' + postid).html() ) ) {
if ( confirm( $('#imgedit-leaving-' + postid).text() ) ) {
return false;
}
return true;

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-51906';
$wp_version = '5.9-alpha-51907';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.