From f98af0c2733df5c39d6d853df6b0d3ab1d3f582f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 20 Jan 2014 14:30:15 +0100 Subject: .flux:not(.current):hover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/367 --- p/themes/Dark/freshrss.css | 2 +- p/themes/Flat/freshrss.css | 2 +- p/themes/Origine/freshrss.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css index e9eb2c705..a5fb06bd2 100644 --- a/p/themes/Dark/freshrss.css +++ b/p/themes/Dark/freshrss.css @@ -269,7 +269,7 @@ .flux .item.title { background: inherit; } - .flux:hover .item.title { + .flux:not(.current):hover .item.title { border-right: 2px solid rgba(127, 127, 127, 0.1); padding-right: 1em; position: absolute; diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css index dca1b3f28..f3bef7222 100644 --- a/p/themes/Flat/freshrss.css +++ b/p/themes/Flat/freshrss.css @@ -264,7 +264,7 @@ body { .flux .item.title { background: inherit; } - .flux:hover .item.title { + .flux:not(.current):hover .item.title { border-right: 2px solid rgba(127, 127, 127, 0.1); padding-right: 1em; position: absolute; diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css index 593f21d30..c71e516ce 100644 --- a/p/themes/Origine/freshrss.css +++ b/p/themes/Origine/freshrss.css @@ -278,7 +278,7 @@ .flux .item.title { background: inherit; } - .flux:hover .item.title { + .flux:not(.current):hover .item.title { border-right: 2px solid rgba(127, 127, 127, 0.1); padding-right: 1em; position: absolute; -- cgit v1.2.3 From c5274cfa298f1020bab30bd6026323be9e4be43d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 20 Jan 2014 14:53:07 +0100 Subject: Pas de survol mobile https://github.com/marienfressinaud/FreshRSS/issues/367 --- p/themes/Dark/freshrss.css | 13 ++++++++----- p/themes/Flat/freshrss.css | 13 ++++++++----- p/themes/Origine/freshrss.css | 13 ++++++++----- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css index a5fb06bd2..718f98272 100644 --- a/p/themes/Dark/freshrss.css +++ b/p/themes/Dark/freshrss.css @@ -268,11 +268,6 @@ } .flux .item.title { background: inherit; - } - .flux:not(.current):hover .item.title { - border-right: 2px solid rgba(127, 127, 127, 0.1); - padding-right: 1em; - position: absolute; } .flux .item.title a { color: #888; @@ -652,6 +647,14 @@ select.number option { text-align:right; } +@media(min-width: 841px) { + .flux:not(.current):hover .item.title { + border-right: 2px solid rgba(127, 127, 127, 0.1); + padding-right: 1em; + position: absolute; + } +} + @media(max-width: 840px) { .header, .aside .btn-important, diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css index f3bef7222..263a69a3a 100644 --- a/p/themes/Flat/freshrss.css +++ b/p/themes/Flat/freshrss.css @@ -263,11 +263,6 @@ body { } .flux .item.title { background: inherit; - } - .flux:not(.current):hover .item.title { - border-right: 2px solid rgba(127, 127, 127, 0.1); - padding-right: 1em; - position: absolute; } .flux .item.title a { color: #333; @@ -656,6 +651,14 @@ select.number option { text-align:right; } +@media(min-width: 841px) { + .flux:not(.current):hover .item.title { + border-right: 2px solid rgba(127, 127, 127, 0.1); + padding-right: 1em; + position: absolute; + } +} + @media(max-width: 840px) { .header, .aside .btn-important, diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css index c71e516ce..20714a80c 100644 --- a/p/themes/Origine/freshrss.css +++ b/p/themes/Origine/freshrss.css @@ -277,11 +277,6 @@ } .flux .item.title { background: inherit; - } - .flux:not(.current):hover .item.title { - border-right: 2px solid rgba(127, 127, 127, 0.1); - padding-right: 1em; - position: absolute; } .flux .item.title a { color: #000; @@ -657,6 +652,14 @@ select.number option { text-align:right; } +@media(min-width: 841px) { + .flux:not(.current):hover .item.title { + border-right: 2px solid rgba(127, 127, 127, 0.1); + padding-right: 1em; + position: absolute; + } +} + @media(max-width: 840px) { .header, .aside .btn-important, -- cgit v1.2.3 From 7974afa83cef524471109304318ecbe6033303ad Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 22 Jan 2014 18:54:33 +0100 Subject: Espace mobile Corrige https://github.com/marienfressinaud/FreshRSS/issues/368 --- p/themes/Dark/freshrss.css | 1 - p/themes/Flat/freshrss.css | 1 - p/themes/Origine/freshrss.css | 1 - 3 files changed, 3 deletions(-) diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css index 718f98272..4516c92ff 100644 --- a/p/themes/Dark/freshrss.css +++ b/p/themes/Dark/freshrss.css @@ -677,7 +677,6 @@ select.number option { .content { font-size: 120%; - padding: 0; } .pagination { diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css index 263a69a3a..a58e04459 100644 --- a/p/themes/Flat/freshrss.css +++ b/p/themes/Flat/freshrss.css @@ -681,7 +681,6 @@ select.number option { .content { font-size: 120%; - padding: 0; } .pagination { diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css index 20714a80c..b94f9d583 100644 --- a/p/themes/Origine/freshrss.css +++ b/p/themes/Origine/freshrss.css @@ -682,7 +682,6 @@ select.number option { .content { font-size: 120%; - padding: 0; } .pagination { -- cgit v1.2.3 From 922129c4db5f507b13ff9fca03efddc704418e68 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 22 Jan 2014 20:34:00 +0100 Subject: Style formulaire connexion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/380 --- app/views/index/formLogin.phtml | 51 +++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml index cc43bcd19..c92b5c187 100644 --- a/app/views/index/formLogin.phtml +++ b/app/views/index/formLogin.phtml @@ -1,4 +1,24 @@ -
+
-
- -
- -
-
-
- -
+

+ + +

+ - +
-

-
-
-
- -
-
+

+ +

-

-
+

-- cgit v1.2.3 From bc6aba67bbe023c461a47bdf7c0c81d061ca6b5a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 22 Jan 2014 21:34:59 +0100 Subject: Bug récupération flux tronqués MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige https://github.com/marienfressinaud/FreshRSS/issues/381 --- app/Models/Feed.php | 44 +------------------------------------------ lib/lib_rss.php | 54 +++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 51 insertions(+), 47 deletions(-) diff --git a/app/Models/Feed.php b/app/Models/Feed.php index df762c8fa..22c019080 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -187,54 +187,12 @@ class FreshRSS_Feed extends Minz_Model { Minz_Exception::ERROR ); } else { - $feed = new SimplePie (); - $feed->set_useragent(Minz_Translate::t ('freshrss') . '/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ') ' . SIMPLEPIE_NAME . '/' . SIMPLEPIE_VERSION); $url = htmlspecialchars_decode ($this->url, ENT_QUOTES); if ($this->httpAuth != '') { $url = preg_replace ('#((.+)://)(.+)#', '${1}' . $this->httpAuth . '@${3}', $url); } - + $feed = customSimplePie(); $feed->set_feed_url ($url); - $feed->set_cache_location (CACHE_PATH); - $feed->set_cache_duration(1500); - $feed->strip_htmltags (array ( - 'base', 'blink', 'body', 'doctype', 'embed', - 'font', 'form', 'frame', 'frameset', 'html', - 'input', 'marquee', 'meta', 'noscript', - 'object', 'param', 'plaintext', 'script', 'style', - )); - $feed->strip_attributes(array_merge($feed->strip_attributes, array( - 'autoplay', 'onload', 'onunload', 'onclick', 'ondblclick', 'onmousedown', 'onmouseup', - 'onmouseover', 'onmousemove', 'onmouseout', 'onfocus', 'onblur', - 'onkeypress', 'onkeydown', 'onkeyup', 'onselect', 'onchange', 'seamless'))); - $feed->add_attributes(array( - 'img' => array('lazyload' => ''), //http://www.w3.org/TR/resource-priorities/ - 'audio' => array('preload' => 'none'), - 'iframe' => array('postpone' => '', 'sandbox' => 'allow-scripts allow-same-origin'), - 'video' => array('postpone' => '', 'preload' => 'none'), - )); - $feed->set_url_replacements(array( - 'a' => 'href', - 'area' => 'href', - 'audio' => 'src', - 'blockquote' => 'cite', - 'del' => 'cite', - 'form' => 'action', - 'iframe' => 'src', - 'img' => array( - 'longdesc', - 'src' - ), - 'input' => 'src', - 'ins' => 'cite', - 'q' => 'cite', - 'source' => 'src', - 'track' => 'src', - 'video' => array( - 'poster', - 'src', - ), - )); $feed->init (); if ($feed->error ()) { diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 33d7ebc32..ba5b01112 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -106,13 +106,59 @@ function html_only_entity_decode($text) { return strtr($text, $htmlEntitiesOnly); } -function sanitizeHTML($data) { +function customSimplePie() { + $simplePie = new SimplePie(); + $simplePie->set_useragent(Minz_Translate::t('freshrss') . '/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ') ' . SIMPLEPIE_NAME . '/' . SIMPLEPIE_VERSION); + $simplePie->set_cache_location(CACHE_PATH); + $simplePie->set_cache_duration(1500); + $simplePie->strip_htmltags(array( + 'base', 'blink', 'body', 'doctype', 'embed', + 'font', 'form', 'frame', 'frameset', 'html', + 'input', 'marquee', 'meta', 'noscript', + 'object', 'param', 'plaintext', 'script', 'style', + )); + $simplePie->strip_attributes(array_merge($simplePie->strip_attributes, array( + 'autoplay', 'onload', 'onunload', 'onclick', 'ondblclick', 'onmousedown', 'onmouseup', + 'onmouseover', 'onmousemove', 'onmouseout', 'onfocus', 'onblur', + 'onkeypress', 'onkeydown', 'onkeyup', 'onselect', 'onchange', 'seamless'))); + $simplePie->add_attributes(array( + 'img' => array('lazyload' => ''), //http://www.w3.org/TR/resource-priorities/ + 'audio' => array('preload' => 'none'), + 'iframe' => array('postpone' => '', 'sandbox' => 'allow-scripts allow-same-origin'), + 'video' => array('postpone' => '', 'preload' => 'none'), + )); + $simplePie->set_url_replacements(array( + 'a' => 'href', + 'area' => 'href', + 'audio' => 'src', + 'blockquote' => 'cite', + 'del' => 'cite', + 'form' => 'action', + 'iframe' => 'src', + 'img' => array( + 'longdesc', + 'src' + ), + 'input' => 'src', + 'ins' => 'cite', + 'q' => 'cite', + 'source' => 'src', + 'track' => 'src', + 'video' => array( + 'poster', + 'src', + ), + )); + return $simplePie; +} + +function sanitizeHTML($data, $base = '') { static $simplePie = null; if ($simplePie == null) { - $simplePie = new SimplePie(); + $simplePie = customSimplePie(); $simplePie->init(); } - return html_only_entity_decode($simplePie->sanitize->sanitize($data, SIMPLEPIE_CONSTRUCT_MAYBE_HTML)); + return html_only_entity_decode($simplePie->sanitize->sanitize($data, SIMPLEPIE_CONSTRUCT_HTML, $base)); } /* permet de récupérer le contenu d'un article pour un flux qui n'est pas complet */ @@ -125,7 +171,7 @@ function get_content_by_parsing ($url, $path) { if ($html) { $doc = phpQuery::newDocument ($html); $content = $doc->find ($path); - return sanitizeHTML($content->__toString()); + return sanitizeHTML($content->__toString(), $url); } else { throw new Exception (); } -- cgit v1.2.3 From f4c8b95b831693f66d46f9ae06550b0944280ebe Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 22 Jan 2014 21:40:28 +0100 Subject: Ordre des entrées de configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implémente https://github.com/marienfressinaud/FreshRSS/issues/374 --- app/layout/aside_configure.phtml | 7 ++++--- app/layout/header.phtml | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index 89f63e36c..27f11ab6d 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -1,8 +1,5 @@ diff --git a/app/layout/header.phtml b/app/layout/header.phtml index d43f682b0..69b9c65a1 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -67,12 +67,13 @@ if (Minz_Configuration::canLogIn()) {