Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40805 closed defect (bug) (fixed)

HTML is stripped on front from titles but not in customizer

Reported by: karmatosed's profile karmatosed Owned by: westonruter's profile 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.

https://cldup.com/ctR2oceuH2.png

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 7 years ago.

Download all attachments as: .zip

Change History (8)

#1 @karmatosed
7 years ago

  • Description modified (diff)

#2 @karmatosed
7 years ago

  • Description modified (diff)

#3 @westonruter
7 years 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
7 years 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.


7 years ago

@westonruter
7 years ago

#6 @westonruter
7 years ago

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

#7 @westonruter
7 years 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.