Mercurial > defr > drupal > scald > scald_dailymotion
comparison scald_dailymotion.module @ 6:f0e59759c605
Feed URL: urlencode the argument.
author | Franck Deroche <franck@defr.org> |
---|---|
date | Tue, 20 Jul 2010 11:56:42 +0200 |
parents | fd5fb845d0bc |
children | f3040f91b65d |
comparison
equal
deleted
inserted
replaced
5:bb63856c865a | 6:f0e59759c605 |
---|---|
154 * - thumbnail: an associative array, containing the source ('src'), width | 154 * - thumbnail: an associative array, containing the source ('src'), width |
155 * and height of the video's thumbnail | 155 * and height of the video's thumbnail |
156 * - pubDate: the publication date of the video | 156 * - pubDate: the publication date of the video |
157 */ | 157 */ |
158 function scald_dailymotion_feed($type, $id) { | 158 function scald_dailymotion_feed($type, $id) { |
159 $url = DAILYMOTION_RSS . $type .'/'. $id; | 159 $url = DAILYMOTION_RSS . $type .'/'. urlencode($id); |
160 $xml = drupal_http_request($url); | 160 $xml = drupal_http_request($url); |
161 $items = array(); | 161 $items = array(); |
162 if ($xml->code != 404 && !empty($xml->data)) { | 162 if ($xml->code != 404 && !empty($xml->data)) { |
163 $dom = DOMDocument::loadXML($xml->data); | 163 $dom = DOMDocument::loadXML($xml->data); |
164 if ($dom) { | 164 if ($dom) { |