Skip to main content

Bug Tracker

Side navigation

#13488 closed bug (notabug)

Opened February 21, 2013 05:50AM UTC

Closed February 24, 2013 09:22PM UTC

IE7 cann't parse correctly the untight code.

Reported by: bd_wyj@sina.com 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>

Attachments (0)
Change History (2)

Changed February 21, 2013 05:54AM UTC by bd_wyj@sina.com comment:1

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);

Changed February 24, 2013 09:22PM UTC by dmethvin comment:2

resolution: → notabug
status: newclosed

Please ask for help on a forum.