[wp-trac] [WordPress Trac] #52340: When doing Add Media - Insert from URL caption textarea fills with HTML markup due to improper HTML
WordPress Trac
noreply at wordpress.org
Thu Jan 21 22:59:31 UTC 2021
#52340: When doing Add Media - Insert from URL caption textarea fills with HTML
markup due to improper HTML
----------------------------------------+-----------------------------
Reporter: mwheelermindbox | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.6
Severity: normal | Keywords:
Focuses: template, coding-standards |
----------------------------------------+-----------------------------
When creating/editing a post and choosing "Add Media" and then "Insert
from URL" in the sidebar of the modal, and entering the URL of the image
the caption field is filled with the markup for the alignment and link
button bars.
Line 1023 of wp-includes/media-template.php is:
<textarea id="embed-image-settings-caption" data-setting="caption" />
but textarea is not allowed to be a self-closing tag, so in Chrome (and
possibly other browsers) this textarea gets filled with the markup to
control image layout.
This is all fixed if line 1023 is changed to the proper markup of:
<textarea id="embed-image-settings-caption" data-
setting="caption"></textarea>
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52340>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list