#9030 closed enhancement (wontfix)
Named entities present in WP core
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Validation | Version: | 2.7 |
| Severity: | normal | Keywords: | has-patch needs-testing gsoc |
| Cc: | wojtek.szkutnik@…, GaryJ |
Description
The entity ' ' is referenced in wp-includes/comment-template.php . While this is fine for most doctypes, it is not universally trouble-free.
I propose that instances of ' ' in this file be replaced with ' ' and that if there are any other named character references in WP core files, then those should also be replaced with their numeric equivalents.
With luck, this will be a painless fix :)
Attachments (3)
Change History (21)
- Keywords reporter-feedback added
- Milestone changed from 2.8 to 2.9
comment:2
in reply to:
↑ 1
sampablokuper — 4 years ago
Replying to westi:
That link reads to me like the issue is not the fact that named entities are used but that the rendering engine (browser) you are using does not know about the DTD you are using and so falls back to plain vanila xml.
That does seem to be what's happening, but since it happens in WebKit and Gecko-based browsers, the userbase potentially affected is large.
Surely a named entity like is valid for the RDFa in XHTML spec and so in that context the document is valid?
Perhaps, but it still causes problems. OTOH, getting rid of named entities other than the 5 predefined XML entities in WP core is a very small task and easy to maintain by using NCRs or their corresponding UTF-8 characters instead.
Another reason in favour of this is that people who want to use WordPress to serve XHTML with XSDs instead of DTDs will benefit too.
Denis-de-Bernardy — 4 years ago
comment:3
follow-up:
↓ 4
Denis-de-Bernardy — 4 years ago
- Keywords has-patch needs-testing 2nd-opinion added; reporter-feedback removed
patch leaves the following untouched:
- javascript libraries
- charmaps
it changes them everywhere else
comment:4
in reply to:
↑ 3
sampablokuper — 4 years ago
Replying to Denis-de-Bernardy:
patch leaves the following untouched:
- javascript libraries
- charmaps
it changes them everywhere else
Thanks for doing this. I haven't tested it, just had a quick look at the diff. I notice that in addition to replacing the named entities, you've made a few other changes, e.g. to wp-admin/edit-link-form.php and wp-admin/edit-page-form.php . Are these related? Sorry if I'm being dense!
Thanks,
Sam
not at all, but it was faster to do them all at once with a mass find/replace selected.
- Keywords needs-patch added; has-patch needs-testing 2nd-opinion removed
patch is broken
comment:7
sampablokuper — 4 years ago
Might be best to stick to one patch per ticket.
In what way is it broken?
it's loaded with Hunk #X FAILED at YYY... needs to be redone.
- Milestone changed from 2.9 to Future Release
- Type changed from defect (bug) to enhancement
comment:10
wojtek.szkutnik — 3 years ago
- Cc wojtek.szkutnik@… added
- Keywords has-patch needs-testing added; needs-patch removed
Redone.
comment:11
wojtek.szkutnik — 3 years ago
- Keywords gsoc added
wojtek.szkutnik — 3 years ago
comment:12
GaryJ — 2 years ago
- Cc GaryJ added
Replaces almost all named entities by their numeric counterparts (hand checked).
comment:13
Chase-san — 12 months ago
I made a patch of this (and most other entities) using trunk-21080. I attached it here.
comment:15
Chase-san — 11 months ago
- Version changed from 2.7 to 3.4
- Version changed from 3.4 to 2.7
Version field indicates when the enhancement was initially suggested.
comment:17
follow-up:
↓ 18
SergeyBiryukov — 5 months ago
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from new to closed
comment:18
in reply to:
↑ 17
Chase-san — 5 months ago
I can deal with that. But I would like to see #13341 fixed sometime soon. I was having issues with that earlier.

That link reads to me like the issue is not the fact that named entities are used but that the rendering engine (browser) you are using does not know about the DTD you are using and so falls back to plain vanila xml.
Surely a named entity like is valid for the RDFa in XHTML spec and so in that context the document is valid?