Bug Tracker

Opened 11 years ago

Closed 10 years ago

Last modified 8 years ago

#4567 closed bug (invalid)

jQuery usage of nbsp character entity

Reported by: serialseb Owned by:
Priority: critical Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

I've struggled for a couple of hours yesterday with firefox really not liking my site served as xhtml 1.1. Took me a while to track down the multitude of plugins and scripts that inject  

The problem comes from firefox not parsing external character references in all situations. Whenever an html fragment gets inserted by firefox, and it contains such character entity, all hell breaks loose and script processing stops.

So I've attached a patch that changes the uses of nbsp to the character code. That said, I think it'd be much better for compat if the jquery codebase as a whole was updated to never use any character entity beyond the 5 xml defined ones. It certainly would've solved the problems I encountered.

Stuff not included: widgets, any test code, and datepicker localization.

Attachments (1)

removenbsp.patch (15.6 KB) - added by serialseb 11 years ago.
Removing nbsp from most libraries

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by serialseb

Attachment: removenbsp.patch added

Removing nbsp from most libraries

comment:1 Changed 11 years ago by serialseb

A simple search and replace for all of the non-xml character entities could be done on both html and js content in the tree. Let me know if there's something you'd find value in and I could get on with it. I've only fixed the ones that I was personally getting breaks from.

comment:2 Changed 11 years ago by serialseb

See #4255 for a related issue

comment:3 Changed 10 years ago by dmethvin

Resolution: invalid
Status: newclosed

jQuery itself isn't injecting the   entities, and although some plugins are hosted here they're the responsibility of individual authors. You should report these bugs to the plugin authors.

Note: See TracTickets for help on using tickets.