Bug when append a node like <link/> and solution

Bug when append a node like <link/> and solution


if you try this,
you will got nothing.
---
$("head").append('<link rel="stylesheet" type="text/css"
href="www.dc9.cn.css" title="base" />');
---
the cause is line 508 in
http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.1.3.1.js
----
div.innerHTML = wrap[1] + arg + wrap[2];
----
the innerHTML attribute is a very annoying attribute.
if you try to use innerHTML to write something like
"<link>"
"<script>"
"<c>ddd</c>"
"<xx/>"
you will get some strange result(tested in IE7)
IE will strip some code and auto complete some code
test yourself
-----
so,the temporarily solution is:
-----
$(document.createElement("link")).attr({"rel":"stylesheet","type":"text/css","href":"www.dc9.cn.css"}).appendTo("head");
-----
if you wanna delete the node like this
you must disable first,then remvove,the code is
----
$("link[@href=xxx]").attr({"disabled":true}).remove();
----
I have study on this bug for more than 3 hours,finally find this
temporarily solution
hope the JQuery 1.1.4 will fix the problem
--
sipo
www.dc9.cn
China Beijing