Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24810 closed defect (bug) (fixed)

Non-rendered HTML entity in audio description in media manager

Reported by: tollmanz's profile tollmanz Owned by:
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.6
Component: Media Keywords: i18n-change
Focuses: Cc:


When viewing an audio file in the media manager modal window, the description prints non-rendered HTML entities in the description field. See attached image for example.

To Reproduce:

  1. Grab Mr. Taylor's excellent sample MP3 with ID3 tags:
  2. In a post edit screen, click Add Media
  3. Upload the MP3
  4. Upon upload, notice the description:
    “Soul Calibur” from Nostalgia by Frank Ocean. Released: 2011. Track 13 of 14. Genre: R&B.
  5. The entities are not converted when displayed in the textarea

For reference:

  • In wp-admin/includes/media.php, the curly quotes are set on lines 237-247.
  • In wp-includes/media.php:L1591 the content is prepared for JS. At that point the entities are not rendered.
  • In wp-includes/media-template.php:L237, the description is printed to the screen as part of a JS template

I'm not really sure what the right move would be here. Convert entities in wp-includes/media.php? Unescape them on output (sounds horribly wrong?

Also, why are we using curly quotes here?

Attachments (2)

non-rendered-entities.png (232.6 KB) - added by tollmanz 11 years ago.
Example of non-rendered entities
24810.diff (1.3 KB) - added by nacin 11 years ago.

Download all attachments as: .zip

Change History (8)

11 years ago

Example of non-rendered entities

#1 @nacin
11 years ago

  • Milestone changed from Awaiting Review to 3.6

Moving to 3.6 for review.

#2 @nacin
11 years ago

We should be using straight quotes here and then letting texturize curl them when rendering a description or general post content.

#3 follow-up: @tollmanz
11 years ago

Ok. Sounds good! I'm happy to work on a patch for this as I've already done some of the leg work on the issue.

11 years ago

#4 in reply to: ↑ 3 @nacin
11 years ago

Replying to tollmanz:

Ok. Sounds good! I'm happy to work on a patch for this as I've already done some of the leg work on the issue.

Sorry — next time just patch if you can.

#5 @nacin
11 years ago

  • Keywords i18n-change added

#6 @nacin
11 years ago

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

In [24788]:

Remove curly quotes from auto content generation for audio tracks on upload. Texturize should be doing this on display.

props tollmanz.
fixes #24810.

Note: See TracTickets for help on using tickets.