Opened 2 years ago
Closed 19 months ago
#17408 closed defect (bug) (fixed)
feed_links_extra does not escape html entities, causing invalid (X)HTML
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Template | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| Cc: | peaceable_whale@… |
Description
I was investigating this forum thread and found that the issue was with core.
When pretty permalinks are disabled, feed_links_extra() can generate URLs like this for a search result:
href="http://localhost/wp/?s=something&feed=rss2"
...which is invalid html because the ampersand should be escaped as an entity.
Patch attached.
Attachments (1)
Change History (8)
comment:1
solarissmoke — 2 years ago
- Component changed from General to Template
solarissmoke — 2 years ago
comment:2
peaceablewhale — 2 years ago
- Cc peaceable_whale@… added
comment:5
SergeyBiryukov — 22 months ago
- Milestone changed from Awaiting Review to 3.3
- Keywords dev-feedback added
Anything that prevents this from commit?
Note: See
TracTickets for help on using
tickets.

Escape href before outputting. Also, there is no need to escape the title in each if{} block, just do it at the end.