Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#855 closed bug (fixed)

Newlines in $(html) crash Firefox

Reported by: [email protected] Owned by:
Priority: major Milestone: 1.1
Component: core Version: 1.1
Keywords: Cc:
Blocked by: Blocking:

Description

Probaby due to regular expression syntax, newlines present in an HTML string sent to the $() constructor will cause a browser hang. For example,

$('<div>test test</div>');

works fine, but

$('<div>test

test</div>');

kills the browser (Firefox 2.0.0.1 Mac).

If the newline is not allowed, a more graceful failure is needed. Something along the lines of:

html = html.replace(/[

]/g, ' '); should be sufficient to allow newlines.

Change History (1)

comment:1 Changed 16 years ago by john

Milestone: 1.1
Resolution: fixed
Status: newclosed
Version: 1.1a1.1

Fixed in SVN rev 1148.

Note: See TracTickets for help on using tickets.