Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#24147 closed defect (bug) (fixed)

Post Format Image breaks with themes other than Twenty Thirteen

Reported by: crondeau's profile crondeau Owned by: markjaquith's profile markjaquith
Milestone: 3.6 Priority: high
Severity: normal Version: 3.6
Component: Post Formats Keywords: has-patch
Focuses: Cc:

Description

I've tested the new post format features with 2011, 2012 and 2013 and a few others at random.

When using themes other than Twenty Thirteen the HTML outputted is as follows:

<div class="post-format-content">
<p><img src="<a href="http://test.bluelimemedia.com/wp/wp-content/uploads/2013/04/iStock_000009713448XSmall.jpg"><img src="http://test.bluelimemedia.com/wp/wp-content/uploads/2013/04/iStock_000009713448XSmall.jpg" width="300" height="198" alt="iStock_000009713448XSmall" class="wp-image-14 alignleft size-medium" /></a>&#8221; alt=&#8221;" /></div>

This happens, when you create the new post format, use the select/upload image button and select an image.
If you don't use the select/upload image button, and simply insert the image url, then the format is fine.

Attachments (1)

24147.patch (1.1 KB) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (9)

#1 @RDall
11 years ago

  • Cc robert@… added

#2 @SergeyBiryukov
11 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 3.6

Confirmed with Twenty Twelve.

Introduced in [24021]. A similar bug with get_the_post_format_image() is mentioned in ticket:23964:16.

#4 @SergeyBiryukov
11 years ago

  • Priority changed from normal to high

#5 @wonderboymusic
11 years ago

http://core.trac.wordpress.org/attachment/ticket/23965/23965.7.diff fixes some other things related to slurping images and is merged with Sergey's patch (they need each other) - at this point, this ticket is a dupe, but I'll let the Trac gods decide what to do

#6 @SergeyBiryukov
11 years ago

Let's keep this ticket as a separate issue for easier tracking, as it's not directly related to caption.

#7 @markjaquith
11 years ago

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

In 24062:

Fix some mangled HTML in image format posts compat.

props SergeyBiryukov. fixes #24147.

#8 @markjaquith
11 years ago

In 24066:

Multiple improvements to image post format insertion and display.

  • get_tag_regex() altered based on Unit Tests.
  • Changes to post-formats.js to provide size and link context during image selection.
  • Captions are now output in the_post_format_image() when present.
  • The meta value for url is respected for the image post format when the HTML in the image meta doesn't include a link

props wonderboymusic. fixes #23965, #23964. see #24147, #24046.

Note: See TracTickets for help on using tickets.