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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51907 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-10-15 00:17:49 +00:00
parent ef20d5fdbe
commit dc54ceabd8
+1 -1
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;