Side navigation
#8114 closed bug (invalid)
Opened February 01, 2011 06:14AM UTC
Closed February 01, 2011 06:45AM UTC
Last modified February 01, 2011 03:43PM UTC
Parsing of <link> tag text is incorrect when a url is specified
Reported by: | simons.mail@gmail.com | 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.
Attachments (0)
Change History (4)
Changed February 01, 2011 06:45AM UTC by comment:1
component: | unfiled → core |
---|---|
keywords: | → needsdocs |
resolution: | → invalid |
status: | new → closed |
Changed February 01, 2011 11:38AM UTC by comment:2
priority: | undecided → low |
---|
Changed February 01, 2011 03:43PM UTC by comment:3
keywords: | needsdocs |
---|
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.