Opened 13 years ago
Closed 13 years ago
#24419 closed defect (bug) (fixed)
Use correct URL in post_formats_compat()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.6 | Priority: | normal |
| Severity: | normal | Version: | 3.6 |
| Component: | Post Formats | Keywords: | |
| Focuses: | Cc: |
Description
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:
- Add a new post of link post format
- Do not add anything in the Title or Link URL fields
- 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>
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
24419.patch uses
$urlfor the text value of the link.