From fe1fba9828ad4d68a3cc93ed5f8e361f34e5a873 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Tue, 16 Feb 2021 12:00:49 -0500 Subject: Add a content action parameter to work with CSS selector (#3453) Before, when retrieving article contents with CSS selector, the content of the RSS feed was replaced by the content of the CSS selector. It works well in most of the cases but if there is a different content in the feed and in the selector, the former is lost. Now, there is a parameter to decide which action is performed after retrieving the content. By default, the previous behavior is kept. But now, it is possible to append or prepend the CSS selector content to the feed content. See #3451 --- app/Controllers/subscriptionController.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/Controllers/subscriptionController.php') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 7435f70b2..1cff6ff56 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -125,6 +125,8 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { } $feed->_attributes('curl_params', empty($opts) ? null : $opts); + $feed->_attributes('content_action', Minz_Request::param('content_action', 'replace')); + if (FreshRSS_Auth::hasAccess('admin')) { $feed->_attributes('ssl_verify', Minz_Request::paramTernary('ssl_verify')); $timeout = intval(Minz_Request::param('timeout', 0)); -- cgit v1.2.3