#8114 closed bug (invalid)
Parsing of <link> tag text is incorrect when a url is specified
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | core | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When Parsing RSS the following does not return the URL as expected. It returns an empty string.
var text = $('<channel><title>Hello world</title><link>http://www.google.com</link></channel>').find('link').text();
I've tested it in firefox and chrome.
Change History (4)
comment:1 Changed 12 years ago by
Component: | unfiled → core |
---|---|
Keywords: | needsdocs added |
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 12 years ago by
Priority: | undecided → low |
---|
comment:3 Changed 12 years ago by
Keywords: | needsdocs removed |
---|
Note: See
TracTickets for help on using
tickets.
That converts the string into an actual dom node - link tags, as you're probably already aware, don't ever contain html; they are self terminating tags.
If you are using this in an ajax request, simply use the "xml" dataType option.
If you need to parse your text, use jQuery.parseXML
http://jsfiddle.net/danheberden/H9K3Z/
Next time, please be sure to submit a jsfiddle.net test case so we can easily jump into your problem.