WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#24810 closed defect (bug) (fixed)

Non-rendered HTML entity in audio description in media manager

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

Description

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: http://core.trac.wordpress.org/attachment/ticket/24805/13%20Soul%20Calibur.mp3
  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 9 months ago.
Example of non-rendered entities
24810.diff (1.3 KB) - added by nacin 9 months ago.

Download all attachments as: .zip

Change History (8)

tollmanz9 months ago

Example of non-rendered entities

comment:1 nacin9 months ago

  • Milestone changed from Awaiting Review to 3.6

Moving to 3.6 for review.

comment:2 nacin9 months ago

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

comment:3 follow-up: tollmanz9 months 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.

nacin9 months ago

comment:4 in reply to: ↑ 3 nacin9 months 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.

comment:5 nacin9 months ago

  • Keywords i18n-change added

comment:6 nacin9 months 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.