WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#3569 closed defect (bug) (fixed)

XHTML compatibility problem with Safari

Reported by: nickshanks Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.0.6
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Safari currently does not parse DTDs for XML content types. Upon changing my html_type to application/xhtml+xml, all named entities encountered caused fatal errors because the <!ENTITY ...> tags were never parsed. The solution is simply to search/replace all &nbsp; &hellip; &raquo; and &rsaquo; tags with their equivalent NCRs. I've not checked every admin page, there may be others lurking but those were the obvious ones.

There is also a <td> Default </tr> in link-categories.php. A </td> is missing.

Attachments (3)

safari-compat.diff (94.2 KB) - added by nickshanks 7 years ago.
Proposesd fix
safari-compat2.diff (148.9 KB) - added by nickshanks 7 years ago.
Proposesd fix
safari-compat3.diff (100.9 KB) - added by nickshanks 7 years ago.
New fix, after rboren's svn:eol-style corrections

Download all attachments as: .zip

Change History (17)

comment:1 foolswisdom7 years ago

  • Milestone 2.1 deleted
  • Resolution set to invalid
  • Severity changed from blocker to normal
  • Status changed from new to closed

Closing as invalid.

Thank you for particating in WordPress!

The problem seems to be much more fundamental and complicated then this and your proposed solution would decrease maintainability.
http://trac.wordpress.org/ticket/3406
http://comox.textdrive.com/pipermail/wp-hackers/2006-December/009848.html

Regarding the misplaced </td>, thank you. I will file this as a separate ticket.

comment:2 matt7 years ago

  • Milestone set to 2.2
  • Resolution invalid deleted
  • Status changed from closed to reopened

This is different than the other tickets and something we should think about for 2.2. I don't think there would be any decrease in maintainability by using numeric entities, we do it already most everywhere.

comment:3 nickshanks7 years ago

I have since been through every admin page in it's default state (initalised database) and those are the only four named entities that trip up Safari.

nickshanks7 years ago

Proposesd fix

comment:4 nickshanks7 years ago

Note that if you view the diff with trac, the file wp-content/themes/default/functions.php will only show a remove line. That file has DOS line endings, unlike all the others, and SVN produces a diff file with alternating empty lines, which trac seems unable to handle.

I would like to see this fix get into 2.1 si possis.

nickshanks7 years ago

Proposesd fix

comment:5 nickshanks7 years ago

  • Keywords has-patch added

Added a new patch. This also changes uarr/darr/larr/rarr to NCRs, and converts the two files wp-content/themes/default/functions.php and wp-includes/js/tinymce/plugins/paste/editor_plugin.js to UNIX line endings so that patch(1) can apply diffs. These files will look odd in trac's diff viewer.

nickshanks7 years ago

New fix, after rboren's svn:eol-style corrections

comment:6 markjaquith7 years ago

  • Owner changed from anonymous to andy
  • Status changed from reopened to new

Andy, can you take a look and make sure the TinyMCE-related replacements won't cause problems?

comment:7 nickshanks7 years ago

To re-create the patch, find/replace the following with NCRs:
nbsp, hellip, raquo, laquo, rsaquo, uarr, darr, larr, rarr

Then revert the file wp-includes/formatting.php (which should not be changed)
Then revert the file wp-includes/js/tinymce/themes/advanced/jscripts/charmap.js
Then edit that same charmaps.js file to restore one &nbsp; to &#160; change towards the bottom.

comment:8 foolswisdom7 years ago

WORKAROUND
NCR Everywhere mentioned on support forum

comment:9 foolswisdom7 years ago

  • Milestone changed from 2.2 to 2.3

comment:10 rob1n7 years ago

  • Owner changed from andy to rob1n

comment:11 ryan7 years ago

  • Milestone changed from 2.3 to 2.4

comment:12 rob1n6 years ago

  • Owner rob1n deleted

comment:13 azaozz6 years ago

  • Milestone 2.5 deleted
  • Resolution set to fixed
  • Status changed from new to closed

This seems to be a problem with Safari 1.2. It seems it has been fixed in newer versions.

comment:14 lloydbudd6 years ago

  • Milestone set to 2.5
Note: See TracTickets for help on using tickets.