#855 closed bug (fixed)
Newlines in $(html) crash Firefox
Reported by: | 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
Milestone: | → 1.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | 1.1a → 1.1 |
Note: See
TracTickets for help on using
tickets.
Fixed in SVN rev 1148.