Make WordPress Core

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#3569 closed defect (bug) (fixed)

XHTML compatibility problem with Safari

Reported by: nickshanks's profile 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 18 years ago.
Proposesd fix
safari-compat2.diff (148.9 KB) - added by nickshanks 18 years ago.
Proposesd fix
safari-compat3.diff (100.9 KB) - added by nickshanks 18 years ago.
New fix, after rboren's svn:eol-style corrections

Download all attachments as: .zip

Change History (17)

#1 @foolswisdom
18 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.

#2 @matt
18 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.

#3 @nickshanks
18 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.

@nickshanks
18 years ago

Proposesd fix

#4 @nickshanks
18 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.

@nickshanks
18 years ago

Proposesd fix

#5 @nickshanks
18 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.

@nickshanks
18 years ago

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

#6 @markjaquith
18 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?

#7 @nickshanks
18 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.

#9 @foolswisdom
18 years ago

  • Milestone changed from 2.2 to 2.3

#10 @rob1n
18 years ago

  • Owner changed from andy to rob1n

#11 @ryan
17 years ago

  • Milestone changed from 2.3 to 2.4

#12 @rob1n
17 years ago

  • Owner rob1n deleted

#13 @azaozz
17 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.

#14 @lloydbudd
17 years ago

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