Bug Tracker

Modify

Ticket #4567 (closed bug: invalid)

Opened 4 years ago

Last modified 15 months ago

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

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

Change History

Changed 4 years ago by serialseb

Removing nbsp from most libraries

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.

comment:2 Changed 4 years ago by serialseb

See #4255 for a related issue

comment:3 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.