Opened 12 years ago
Closed 11 years ago
#28251 closed defect (bug) (fixed)
Twenty Fourteen: Full size image link attribute escaping missing in image template
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.0 | Priority: | normal |
| Severity: | normal | Version: | 4.0 |
| Component: | Bundled Theme | Keywords: | has-patch |
| Focuses: | Cc: |
Description
The full size image link in the image template file is missing escaping. The attached patch wraps wp_get_attachment_url with esc_url.
Attachments (4)
Change History (20)
#1
follow-up:
↓ 3
@
12 years ago
- Keywords has-patch reporter-feedback added
- Milestone changed from Awaiting Review to 4.0
#2
in reply to:
↑ description
@
12 years ago
The get_permalink() call a few lines later needs escaping too.
#3
in reply to:
↑ 1
;
follow-up:
↓ 4
@
12 years ago
Replying to lancewillett:
Thanks Philip. (Fanks!)
Two quick thoughts:
- Can you take a look at all the default themes? My guess is it's not escaped everywhere.
- Should we submit "upstream" to the core function to be escaped by default? I think it's a better experience for theme developers not to need to escape core functions.
Fanks, Lance!
- Sure thing, I can take a look first thing tomorrow.
- This is a really good point, and it's something that I had to make sure of before I submitted this patch (searching to see if
wp_get_attachment_urlwas already escaped by core). In general I think that if the escaping happens within the core functions then all the better.
Would it still make sense to proceed with escaping all-the-things until core has taken care of them (plus 2 versions for back compat)?
#4
in reply to:
↑ 3
@
12 years ago
Replying to philiparthurmoore:
Would it still make sense to proceed with escaping all-the-things until core has taken care of them (plus 2 versions for back compat)?
Yes, totes.
@
11 years ago
This new patch for Twenty Fourteen adds in proper escaping for the parent post link and attachment link in the image template.
#5
@
11 years ago
It looks like only Twenty Fourteen and Twenty Ten had issues with this. Twenty Thirteen, Twenty Twelve, and Twenty Eleven all look to have proper escaping present.
#9
follow-up:
↓ 10
@
11 years ago
Should we submit "upstream" to the core function to be escaped by default? I think it's a better experience for theme developers not to need to escape core functions.
Leaving this open until we patch the core file to escape by default.
#10
in reply to:
↑ 9
;
follow-up:
↓ 11
@
11 years ago
Replying to lancewillett:
Leaving this open until we patch the core file to escape by default.
We should probably open a new ticket for that.
#11
in reply to:
↑ 10
@
11 years ago
Replying to obenland:
Replying to lancewillett:
Leaving this open until we patch the core file to escape by default.
We should probably open a new ticket for that.
:)
Thanks Philip. (Fanks!)
Two quick thoughts: