Make WordPress Core

Opened 16 years ago

Closed 12 years ago

Last modified 12 years ago

#9030 closed enhancement (wontfix)

Named entities present in WP core

Reported by: sampablokuper's profile sampablokuper Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Validation Keywords: has-patch needs-testing gsoc
Focuses: Cc:

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)

9030.diff (32.9 KB) - added by Denis-de-Bernardy 15 years ago.
9030.2.diff (40.9 KB) - added by wojtek.szkutnik 14 years ago.
entityrep.diff (127.0 KB) - added by Chase-san 12 years ago.
Replaces almost all named entities by their numeric counterparts (hand checked).

Download all attachments as: .zip

Change History (21)

#1 follow-up: @westi
16 years ago

  • Keywords reporter-feedback added
  • Milestone changed from 2.8 to 2.9

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?

#2 in reply to: ↑ 1 @sampablokuper
16 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.

#3 follow-up: @Denis-de-Bernardy
15 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

#4 in reply to: ↑ 3 @sampablokuper
15 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

#5 @Denis-de-Bernardy
15 years ago

not at all, but it was faster to do them all at once with a mass find/replace selected.

#6 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; has-patch needs-testing 2nd-opinion removed

patch is broken

#7 @sampablokuper
15 years ago

Might be best to stick to one patch per ticket.

In what way is it broken?

#8 @Denis-de-Bernardy
15 years ago

it's loaded with Hunk #X FAILED at YYY... needs to be redone.

#9 @Denis-de-Bernardy
15 years ago

  • Milestone changed from 2.9 to Future Release
  • Type changed from defect (bug) to enhancement

#10 @wojtek.szkutnik
14 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch needs-testing added; needs-patch removed

Redone.

#11 @wojtek.szkutnik
14 years ago

  • Keywords gsoc added

#12 @GaryJ
14 years ago

  • Cc GaryJ added

@Chase-san
12 years ago

Replaces almost all named entities by their numeric counterparts (hand checked).

#13 @Chase-san
12 years ago

I made a patch of this (and most other entities) using trunk-21080. I attached it here.

#15 @Chase-san
12 years ago

  • Version changed from 2.7 to 3.4

#16 @SergeyBiryukov
12 years ago

  • Version changed from 3.4 to 2.7

Version field indicates when the enhancement was initially suggested.

#17 follow-up: @SergeyBiryukov
12 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

#8714 suggests an opposite change (to standardize on …).

Getting rid of named entities in core doesn't sound like something we want to do. Even though there's a somewhat recent patch, the ticket had no other traction for two years. I guess it's safe to close it along with #13341.

Last edited 12 years ago by SergeyBiryukov (previous) (diff)

#18 in reply to: ↑ 17 @Chase-san
12 years ago

I can deal with that. But I would like to see #13341 fixed sometime soon. I was having issues with that earlier.

Note: See TracTickets for help on using tickets.