Make WordPress Core

Changeset 51907


Ignore:
Timestamp:
10/15/2021 12:17:49 AM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/image-edit.js

    r50420 r51907  
    894894
    895895        if ( pop < history.length ) {
    896             if ( confirm( $('#imgedit-leaving-' + postid).html() ) ) {
     896            if ( confirm( $('#imgedit-leaving-' + postid).text() ) ) {
    897897                return false;
    898898            }
Note: See TracChangeset for help on using the changeset viewer.