summaryrefslogtreecommitdiffstats
path: root/js/public
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-08-07 15:30:01 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-08-07 15:30:12 +0200
commitc8b04a1395798404a87e27b7a3f69f5d45859a0c (patch)
tree785ab602ee5cead371a5432b07bd0394666b2c23 /js/public
parent4c9601da0f23027e02bd9922d6dd8a6ccd28a97c (diff)
also use title as folder name if text is not on the opml outline element, fix #306
Diffstat (limited to 'js/public')
-rw-r--r--js/public/app.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/public/app.js b/js/public/app.js
index 653b857d1..39cd509c4 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -2407,7 +2407,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
};
OPMLParser.prototype._recursivelyParse = function($xml, structure) {
- var $outline, feed, folder, outline, _i, _len, _ref, _results;
+ var $outline, feed, folder, outline, title, _i, _len, _ref, _results;
_ref = $xml.children('outline');
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@@ -2417,7 +2417,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
feed = new Feed($outline.attr('text'), $outline.attr('xmlUrl'));
_results.push(structure.add(feed));
} else {
- folder = new Folder($outline.attr('text'));
+ title = $outline.attr('text') || $outline.attr('title');
+ folder = new Folder(title);
structure.add(folder);
_results.push(this._recursivelyParse($outline, folder));
}