Make WordPress Core

#40805 closed defect (bug) (fixed)

HTML is stripped on front from titles but not in customizer

Reported by: karmatosed Owned by: westonruter
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.8
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description (last modified by karmatosed)

I was working with the audio widget and noticed that the HTML tags are stripped from the front, yet show in customizer.


The output is this: https://cldup.com/rtCg2l7m6k.png

I would suggest either add information to say this happens or strip on save.

Attachments (1)

40805.0.diff (575 bytes) - added by westonruter 14 months ago.

Download all attachments as: .zip

Change History (8)

#1 @karmatosed
14 months ago

  • Description modified (diff)

#2 @karmatosed
14 months ago

  • Description modified (diff)

#3 @westonruter
14 months ago

  • Milestone changed from Awaiting Review to 4.8

I am only getting this behavior if I click out of the Audio, Video, or Image widget immediately after entering a tag into the title field. If I wait for the update-widget spinner to finish and then click out, it doesn't clear like it does for other widgets. This is due to the new media widgets only using the input event instead of also including the change event for when to handle updates.

#4 @westonruter
14 months ago

  • Keywords needs-patch added

Depiction of issue: https://cloudup.com/cc6x1VwaO7y

I think all that may be required here is to add change to the events that are attached to the title field.

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.

14 months ago

#6 @westonruter
14 months ago

  • Keywords has-patch added; needs-patch removed
  • Version set to trunk

#7 @westonruter
14 months ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 40785:

Widgets: Ensure title field for media widget will update with sanitized value after change event in addition to input event.

Aligns behavior of field with Text widget and other widgets whereby the server-sanitized title (via the widget-update request) is supplied into the field after the change event.

See #32417.
Fixes #40805.

Note: See TracTickets for help on using tickets.