Bug Tracker

Opened 11 years ago

Closed 11 years ago

#13488 closed bug (notabug)

IE7 cann't parse correctly the untight code.

Reported by: bd_wyj@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Description

In ie6 ie7 ie8, there is a bug for the $.html() method. Please read the following code.The issue will occur in all version.

<!DOCTYPE html> <html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>ie6 ie7 ie8 $.html() bug</title> <script type="text/javascript" src="jquery.js"></script>

</head> <body>

<div id="demo1"></div>

<script type="text/javascript">

$(function() {

var html = "\r\n\<div>IE7 cann't parse correctly the untight code.</div></div></div>"; $('#demo1').html(html);It cann't parse correctly. $('#demo1')[0].innerHTML = html; It can parse correctly.

});

</script>

</body>

</html>

Change History (2)

comment:1 Changed 11 years ago by bd_wyj@…

var html = "\r\n\<div>IE7 cann't parse correctly the untight code.</div></div></div>"; $('#demo1').html(html);

It cann't parse correctly.But the following code can parse.

var html = "\r\n\<div>IE7 cann't parse correctly the untight code.</div>"; $('#demo1').html(html);

comment:2 Changed 11 years ago by dmethvin

Resolution: notabug
Status: newclosed

Please ask for help on a forum.

Note: See TracTickets for help on using tickets.