diff --git a/media/css/reader.css b/media/css/reader.css index 94820ae3c..686bedf3a 100644 --- a/media/css/reader.css +++ b/media/css/reader.css @@ -859,9 +859,6 @@ hr { opacity: 1; } */ -.NB-feedlist .folder.NB-selected > .folder_title .feed_counts_floater { - margin-right: 24px; -} .NB-feedlist .feed.NB-toplevel:hover .feed_favicon { display: none; diff --git a/media/js/newsblur/views/dashboard_river_view.js b/media/js/newsblur/views/dashboard_river_view.js index e6ccf709a..6afddb33f 100644 --- a/media/js/newsblur/views/dashboard_river_view.js +++ b/media/js/newsblur/views/dashboard_river_view.js @@ -90,7 +90,7 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({ this.$(".NB-module-river-settings").html($options); }, - feeds: function () { + feeds: function (include_read) { var river_id = this.model.get('river_id'); if (_.string.startsWith(river_id, 'feed:')) { @@ -107,13 +107,13 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({ var feeds; var visible_only = NEWSBLUR.assets.view_setting(river_id, 'read_filter') == 'unread'; - if (visible_only) { + if (visible_only && !include_read) { feeds = _.pluck(active_folder.feeds_with_unreads(), 'id'); } if (!feeds || !feeds.length) { feeds = active_folder.feed_ids_in_folder(); } - + console.log(['River feeds', river_id, feeds.length, feeds]); return feeds; }, @@ -338,16 +338,17 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({ if (feed_stories_per_month > NEWSBLUR.assets.preference('infrequent_stories_per_month')) { return; } - } - - if (this.options.global_feed) { + } else if (this.options.global_feed) { // Global Shared Stories don't come in real-time (yet) return; + } else if (!_.contains(this.feeds(true), parseInt(feed_id, 10))) { + console.log(['New story not in folder', this.model.get('river_id'), feed_id, this.feeds()]); + return; } - + var subs = feed.get('num_subscribers'); var delay = subs * 2; // 1,000 subs = 2 seconds - console.log(['Fetching dashboard story', story_hash, delay + 'ms delay']); + console.log(['Fetching dashboard story', this.model.get('river_id'), story_hash, delay + 'ms delay']); _.delay(_.bind(function() { NEWSBLUR.assets.add_dashboard_story(story_hash, this.options.dashboard_stories); diff --git a/utils/story_functions.py b/utils/story_functions.py index a5d3333af..400d9ee4f 100644 --- a/utils/story_functions.py +++ b/utils/story_functions.py @@ -144,7 +144,7 @@ def pre_process_story(entry, encoding): if 'summary_detail' in entry and entry['summary_detail'].get('type', None) == 'text/plain': try: - entry['story_content'] = feedparser._sanitizeHTML(entry['story_content'], encoding, 'text/plain') + entry['story_content'] = feedparser.sanitizer._sanitize_html(entry['story_content'], encoding, 'text/plain') if encoding and not isinstance(entry['story_content'], str): entry['story_content'] = entry['story_content'].decode(encoding, 'ignore') except UnicodeEncodeError: