I don't know if it's a typo in your email or if this problem exists in your
code, but you're missing the double-quote at the end of the src attribute
value.

As far as jQuery altering tags, it simply takes any html you give it and
passes it on to the browser. The brower's html parser tries to make sense of
it and create elements from it. When you then ask for the html contents of
an element using .html(), it again asks the browser for what it has as the
html for that element. Everything I just detailed is not XML parsing and
manipulation. It's html, so the rules of each browser's html parser apply.

Note: in the future this kind of question should be posted to the main
jQuery list:

http://groups.google.com/group/jquery-en

where the jquery-ui list is for questions about jQuery UI plugins, listed
here:

http://jqueryui.com/demos/

Thanks.

- Richard

On Wed, Dec 9, 2009 at 5:40 AM, Frycake <[email protected]> wrote:

> Hi all,
> I'm looking for a shortcut to manipulate a dom XML, and for that I
> need the html function from jquery.
> My problem is that Jquery alters some tag when using html function, by
> instance :
>
> code :
> var test = '<div><image src="images/icons.png></image></div>';
> console.log ($(test).html ());
>
> result :
> <img src="images/icons.png">
>
> My image tag is transformed in img tag.
>
> If someone has an idea, I'm will be really grateful.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "jQuery UI" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<jquery-ui%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jquery-ui?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.


Reply via email to