From 10534e860b554a6170b798992090e3a398bac284 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 21:05:19 +0400 Subject: [PATCH 01/12] feedBrowser: fix typo in removeFromArchive (closes #603) --- js/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index d7e10c652..e84ba57c5 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1755,7 +1755,7 @@ function feedBrowser() { if (confirm(pr)) { Element.show('feed_browser_spinner'); - var query = "?op=rpc&method=remarchived&ids=" + + var query = "?op=rpc&method=remarchive&ids=" + param_escape(selected.toString());; new Ajax.Request("backend.php", { From 46ec3348ca9ad381dcecfd01a1e6620e83abde82 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 21:22:20 +0400 Subject: [PATCH 02/12] harmful tags: enable font --- include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index d9a3a5963..ca129ab81 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2656,7 +2656,7 @@ $allowed_elements = array('a', 'address', 'audio', 'article', 'b', 'big', 'blockquote', 'body', 'br', 'cite', - 'code', 'dd', 'del', 'details', 'div', 'dl', + 'code', 'dd', 'del', 'details', 'div', 'dl', 'font', 'dt', 'em', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'html', 'i', 'img', 'ins', 'kbd', 'li', 'nav', 'ol', 'p', 'pre', 'q', 's','small', From 943de334a37787e0ebb69946d929f01712859da5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 21:30:19 +0400 Subject: [PATCH 03/12] removefromarchive: fix another typo (refs #603) --- js/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index e84ba57c5..4840bcbe1 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1746,7 +1746,7 @@ function feedBrowser() { } }); }, removeFromArchive: function() { - var selected = this.getSelectedFeeds(); + var selected = this.getSelectedFeedIds(); if (selected.length > 0) { From bfdf07bb6e3965b2ac27e5962a90b06f4450bf63 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 21:42:08 +0400 Subject: [PATCH 04/12] deprecate manual update button --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 6d9608a38..57a370d91 100644 --- a/index.php +++ b/index.php @@ -185,7 +185,8 @@ - From 4e4048024a2007527eaf713408c03e83f319b4ed Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 22:18:56 +0400 Subject: [PATCH 05/12] iframe sandbox: allow scripts --- include/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index ca129ab81..417a05c23 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2634,7 +2634,8 @@ $entries = $xpath->query('//iframe'); foreach ($entries as $entry) { - $entry->setAttribute('sandbox', true); + $entry->setAttribute('sandbox', 'allow-scripts'); + } global $pluginhost; From 2a3b6de0efd66a9643bce7ded70288d0ddf9fb24 Mon Sep 17 00:00:00 2001 From: Joschasa Date: Wed, 20 Mar 2013 22:59:08 +0100 Subject: [PATCH 06/12] remove deprecated theme_image() --- classes/dlg.php | 6 ++---- classes/feeds.php | 16 ++++++---------- classes/rpc.php | 2 +- include/functions.php | 21 ++++++++------------- index.php | 8 ++++---- plugins/close_button/init.php | 2 +- plugins/flattr/init.php | 2 +- plugins/googleplus/init.php | 2 +- plugins/identica/init.php | 2 +- plugins/mail/init.php | 2 +- plugins/mailto/init.php | 2 +- plugins/note/init.php | 2 +- plugins/owncloud/init.php | 2 +- plugins/pinterest/init.php | 2 +- plugins/pocket/init.php | 2 +- plugins/share/init.php | 2 +- plugins/tweet/init.php | 2 +- 17 files changed, 33 insertions(+), 44 deletions(-) diff --git a/classes/dlg.php b/classes/dlg.php index 74eb9f633..3bb2caba4 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -236,8 +236,7 @@ class Dlg extends Handler_Protected { print "
"; + id='feed_add_spinner' src='images/indicator_white.gif'>"; print "
+ id='feed_browser_spinner' src='images/indicator_white.gif'> diff --git a/classes/feeds.php b/classes/feeds.php index 0568eb985..50a265544 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -321,24 +321,22 @@ class Feeds extends Handler_Protected { if ($line["marked"] == "t" || $line["marked"] == "1") { $marked_pic = "link, 'images/mark_set.svg')."\" + src=\"images/mark_set.svg\" class=\"markedPic\" alt=\"Unstar article\" onclick='javascript:toggleMark($id)'>"; } else { $marked_pic = "link, 'images/mark_unset.svg')."\" + src=\"images/mark_unset.svg\" class=\"markedPic\" alt=\"Star article\" onclick='javascript:toggleMark($id)'>"; } if ($line["published"] == "t" || $line["published"] == "1") { - $published_pic = "link, - 'images/pub_set.svg')."\" + $published_pic = "\"Unpublish"; } else { - $published_pic = "link, - 'images/pub_unset.svg')."\" + $published_pic = "\"Publish"; } @@ -363,8 +361,7 @@ class Feeds extends Handler_Protected { $score = $line["score"]; - $score_pic = theme_image($this->link, - "images/" . get_score_pic($score)); + $score_pic = "images/" . get_score_pic($score); /* $score_title = __("(Click to change)"); $score_pic = "link, - 'images/tag.png')."' alt='Tags' title='Tags'> + $reply['content'] .= "Tags $tags_str (+)"; diff --git a/classes/rpc.php b/classes/rpc.php index b297bbade..139f1fe49 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -663,7 +663,7 @@ class RPC extends Handler_Protected { score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]); print json_encode(array("id" => $id, - "score_pic" => theme_image($link, get_score_pic($score)))); + "score_pic" => get_score_pic($score))); } function setpanelmode() { diff --git a/include/functions.php b/include/functions.php index 417a05c23..c91735488 100644 --- a/include/functions.php +++ b/include/functions.php @@ -786,11 +786,6 @@ } } - // Deprecated, TODO: remove - function theme_image($link, $filename) { - return $filename; - } - function convert_timestamp($timestamp, $source_tz, $dest_tz) { try { @@ -1825,10 +1820,10 @@ function make_init_params($link) { $params = array(); - $params["sign_progress"] = theme_image($link, "images/indicator_white.gif"); - $params["sign_progress_tiny"] = theme_image($link, "images/indicator_tiny.gif"); - $params["sign_excl"] = theme_image($link, "images/sign_excl.svg"); - $params["sign_info"] = theme_image($link, "images/sign_info.svg"); + $params["sign_progress"] = "images/indicator_white.gif"; + $params["sign_progress_tiny"] = "images/indicator_tiny.gif"; + $params["sign_excl"] = "images/sign_excl.svg"; + $params["sign_info"] = "images/sign_info.svg"; foreach (array("ON_CATCHUP_SHOW_NEXT_FEED", "HIDE_READ_FEEDS", "ENABLE_FEED_CATS", "FEEDS_SORT_BY_UNREAD", "CONFIRM_FEED_CATCHUP", @@ -2839,19 +2834,19 @@ function format_warning($msg, $id = "") { global $link; return "
- $msg
"; + $msg
"; } function format_notice($msg, $id = "") { global $link; return "
- $msg
"; + $msg"; } function format_error($msg, $id = "") { global $link; return "
- $msg
"; + $msg"; } function print_notice($msg) { @@ -3040,7 +3035,7 @@ if (!$entry_comments) $entry_comments = " "; # placeholder $rv['content'] .= "