Ticket #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: | ||
| Blocking: | Blocked by: |
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
Change History
Changed 4 years ago by serialseb
-
attachment
removenbsp.patch
added
comment:1 Changed 4 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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Removing nbsp from most libraries