diff options
author | Andrew Dolgov <[email protected]> | 2008-08-13 08:50:28 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-08-13 08:50:28 +0100 |
commit | 338ce36c218220f335546da724deca5f215720d9 (patch) | |
tree | 77f47edf39524ce742b731e2b770d09cd587b566 | |
parent | 074bf20c7fadaa7c2b9bf133110e1025cc2655d2 (diff) |
fix break when calling catchupFeedInGroup() in grouped vfeed mode on a feed with a single quote in a name
-rw-r--r-- | functions.php | 4 | ||||
-rw-r--r-- | tt-rss.js | 16 |
2 files changed, 14 insertions, 6 deletions
diff --git a/functions.php b/functions.php index f2800552f..8367dcaa1 100644 --- a/functions.php +++ b/functions.php @@ -5007,7 +5007,7 @@ $cur_feed_title = htmlspecialchars($cur_feed_title); - $vf_catchup_link = "(<a onclick='javascript:catchupFeedInGroup($feed_id, \"$cur_feed_title\");' href='#'>mark as read</a>)"; + $vf_catchup_link = "(<a onclick='javascript:catchupFeedInGroup($feed_id);' href='#'>mark as read</a>)"; print "<tr class='feedTitle'><td colspan='7'>". "<div style=\"float : right\">$feed_icon_img</div>". @@ -5088,7 +5088,7 @@ $cur_feed_title = htmlspecialchars($cur_feed_title); - $vf_catchup_link = "(<a onclick='javascript:catchupFeedInGroup($feed_id, \"$cur_feed_title\");' href='#'>mark as read</a>)"; + $vf_catchup_link = "(<a onclick='javascript:catchupFeedInGroup($feed_id);' href='#'>mark as read</a>)"; $has_feed_icon = is_file(ICONS_DIR . "/$feed_id.ico"); @@ -718,12 +718,20 @@ function catchupCurrentFeed() { } } -function catchupFeedInGroup(id, title) { +function catchupFeedInGroup(id) { - var str = __("Mark all articles in %s as read?").replace("%s", title); + try { - if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) { - return viewCurrentFeed('MarkAllReadGR:' + id) + var title = getFeedName(id); + + var str = __("Mark all articles in %s as read?").replace("%s", title); + + if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) { + return viewCurrentFeed('MarkAllReadGR:' + id) + } + + } catch (e) { + exception_error("catchupFeedInGroup", e); } } |