[wp-trac] [WordPress Trac] #24419: Use correct URL in post_formats_compat()

WordPress Trac noreply at wordpress.org
Sat May 25 05:22:18 UTC 2013


#24419: Use correct URL in post_formats_compat()
--------------------------+-----------------------------
 Reporter:  tollmanz      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Post Formats  |    Version:  trunk
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 When getting the URL for the link post format in `post_formats_compat()`,
 the incorrect URL value is used.  Within the `switch` statement, when
 `link` is the case, the first conditional statement gets the URL that
 represents the link and assigns it to `$url`.  Within the next
 conditional, the HTML for the link is composed. Instead of using `$url` it
 uses `$meta['link_url']`. This value may not be set, which will result in
 a blank URL being printed (e.g., `<a href="http://google.com"></a>`).

 To reproduce the issue:

 1. Add a new post of link post format
 1. Do not add anything in the Title or Link URL fields
 1. Type "http://google.com" in the post content

 This results in:

 `<a href="http://google.com"></a>`

 When the expected output is:

 `<a href="http://google.com">http://google.com</a>`

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24419>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list