Permalink
Browse files

Fix processing instruction handler to avoid interpretting extraneouso…

… whitespace as attribute names.
  • Loading branch information...
1 parent 288adae commit c9eea2d49ba61e9be34cdfe5d153b2b2a8298dda @danmactough committed Jun 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 main.js
View
@@ -151,7 +151,7 @@ FeedParser.prototype.handleError = function (next, e){
FeedParser.prototype.handleProcessingInstruction = function (node) {
if (node.name !== 'xml') return;
- this.meta['#xml'] = node.body.split(' ').reduce(function (map, attr) {
+ this.meta['#xml'] = node.body.trim().split(' ').reduce(function (map, attr) {
var parts = attr.split('=');
map[parts[0]] = parts[1] && parts[1].length > 2 && parts[1].match(/^.(.*?).$/)[1];
return map;

0 comments on commit c9eea2d

Please sign in to comment.