File: improved-GeoRSS-parsing.patch

package info (click to toggle)
openlayers 2.13.1%2Bds2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 67,256 kB
  • sloc: xml: 7,435; python: 907; sh: 44; makefile: 19
file content (20 lines) | stat: -rw-r--r-- 795 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Improve GeoRSS parsing
 Fix gracefully handle some GeoRSS on IE8 and older.
 Example: <http://kobenhavnsdelebiler.dk/kort/biler.rdf>
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2011-10-09

--- a/lib/OpenLayers/Layer/GeoRSS.js
+++ b/lib/OpenLayers/Layer/GeoRSS.js
@@ -144,7 +144,10 @@ OpenLayers.Layer.GeoRSS = OpenLayers.Cla
                 name = doc.getElementsByTagNameNS('*', 'title')[0].firstChild.nodeValue;
             }
             catch (e) {
-                name = doc.getElementsByTagName('title')[0].firstChild.nodeValue;
+                try {
+                    name = doc.getElementsByTagName('title')[0].firstChild.nodeValue;
+                }
+                catch (e) {}
             }
             if (name) {
                 this.setName(name);