diff --git a/inc/3rdparty/libraries/PHPePub/Zip.php b/inc/3rdparty/libraries/PHPePub/Zip.php index 01e035662..92e78e703 100644 --- a/inc/3rdparty/libraries/PHPePub/Zip.php +++ b/inc/3rdparty/libraries/PHPePub/Zip.php @@ -569,7 +569,7 @@ class Zip { if ($inline) { $cd .= "inline"; } else{ - $cd .= "attached"; + $cd .= "attachment"; } if ($fileName) { $cd .= '; filename="' . $fileName . '"'; diff --git a/inc/3rdparty/site_config/standard/aclu.org.txt b/inc/3rdparty/site_config/standard/aclu.org.txt new file mode 100644 index 000000000..74236e2d6 --- /dev/null +++ b/inc/3rdparty/site_config/standard/aclu.org.txt @@ -0,0 +1,5 @@ +body: //div[@class='panel-panel panel-main-3 content-column'] +title: //div[@class='panel-pane pane-node-title'] +date: //div[@class='updated-date'] + +test_url: https://www.aclu.org/blog/free-future/chinas-nightmarish-citizen-scores-are-warning-americans diff --git a/inc/3rdparty/site_config/standard/bez.es.txt b/inc/3rdparty/site_config/standard/bez.es.txt new file mode 100644 index 000000000..cab7c6f7d --- /dev/null +++ b/inc/3rdparty/site_config/standard/bez.es.txt @@ -0,0 +1,5 @@ +body: //div[@class='text_art'] +strip: //div[@class='cab_datos_opinion'] +strip: //div[@class='sumario2_left'] + +test_url: http://www.bez.es/382758623/otros-fracasos-empresas.html diff --git a/inc/3rdparty/site_config/standard/blog.cloudflare.com.txt b/inc/3rdparty/site_config/standard/blog.cloudflare.com.txt index db80a35f7..2f9a5a2fe 100755 --- a/inc/3rdparty/site_config/standard/blog.cloudflare.com.txt +++ b/inc/3rdparty/site_config/standard/blog.cloudflare.com.txt @@ -1,9 +1,10 @@ # Instapaper gets this back to front and only gets the blog title instead of the article title. -title: substring-before(//title, '-') +title: //div[@class='title'] author: //a[ contains(@href, '/people') ] -body: //div[ @class='post' ] +body: //div[ @class='post-content' ] # Date is impossible to retrieve since they use those stupid "fuzzy" dates, inserted through javascript, at posterous. -test_url: http://blog.cloudflare.com/understanding-analytics-when-is-a-page-view-n \ No newline at end of file +test_url: http://blog.cloudflare.com/understanding-analytics-when-is-a-page-view-n +test_url: https://blog.cloudflare.com/sha-1-deprecation-no-browser-left-behind diff --git a/inc/3rdparty/site_config/standard/caffereggio.net.txt b/inc/3rdparty/site_config/standard/caffereggio.net.txt new file mode 100644 index 000000000..08e1f05ae --- /dev/null +++ b/inc/3rdparty/site_config/standard/caffereggio.net.txt @@ -0,0 +1,3 @@ +body: //div[@class="pf-content"] + +test_url: http://www.caffereggio.net/2016/01/16/115327/ diff --git a/inc/3rdparty/site_config/standard/chronicle.com.txt b/inc/3rdparty/site_config/standard/chronicle.com.txt index e86d3eca7..227a03c7b 100755 --- a/inc/3rdparty/site_config/standard/chronicle.com.txt +++ b/inc/3rdparty/site_config/standard/chronicle.com.txt @@ -1,17 +1,10 @@ title: //h1[contains(@class, "entry-title")] author: //p[contains(@class, "byline")] -# blog articles (chronicle.com/blogs/*) -body: //div[contains(@class, "abstract")] -date: //p[contains(@class, "time")] - # all (?) other articles -body: //div[@id="article-body"] +body: //div[@class="content-item__story"] date: //p[contains(@class, "dateline")] -# remove sidebars containing images (I assume this is desired for Instapaper) -strip: //div[@id="related"] -strip: //div[contains(@class, "image")] - -# note that if you're not a Chronicle subscriber (personally or institutionally), you'll only see the first couple of paragraphs of the article, and Instapaper will display that with some crap above and below. thank goodness for that bookmarklet -test_url: http://chronicle.com/article/In-a-Land-of-Second-Chances/128375/ \ No newline at end of file +# note that if you're not a Chronicle subscriber (personally or institutionally), you'll only see the first couple of paragraphs of the article, and Instapaper $ +test_url: http://chronicle.com/article/In-a-Land-of-Second-Chances/128375/ +test_url: http://chronicle.com/blogs/wiredcampus/university-run-boot-camps-offer-students-marketable-skills-but-not-course-credit/57494 diff --git a/inc/3rdparty/site_config/standard/deia.com.txt b/inc/3rdparty/site_config/standard/deia.com.txt new file mode 100644 index 000000000..d2f782394 --- /dev/null +++ b/inc/3rdparty/site_config/standard/deia.com.txt @@ -0,0 +1,4 @@ +body: //div[@class='widget full_article'] +strip: //div[@class='Herramientas'] + +test_url: http://www.deia.com/2015/10/03/politica/euskadi/el-envilecimiento-de-la-politica-y-de-los-medios-de-comunicacion diff --git a/inc/3rdparty/site_config/standard/diagonalperiodico.net.txt b/inc/3rdparty/site_config/standard/diagonalperiodico.net.txt new file mode 100644 index 000000000..f0681bacc --- /dev/null +++ b/inc/3rdparty/site_config/standard/diagonalperiodico.net.txt @@ -0,0 +1,4 @@ +body: //div[@class='field__items'] +title: //div[@class='art_titulo'] + +test_url: https://www.diagonalperiodico.net/global/27947-cuanto-mas-tiempo-nos-aferremos-este-sistema-peor-y-menores-seran-nuestras-opciones diff --git a/inc/3rdparty/site_config/standard/esglobal.org.txt b/inc/3rdparty/site_config/standard/esglobal.org.txt new file mode 100644 index 000000000..6408f441c --- /dev/null +++ b/inc/3rdparty/site_config/standard/esglobal.org.txt @@ -0,0 +1,3 @@ +body: //div[@class='blog-content'] + +test_url: http://www.esglobal.org/el-caos-en-el-este-los-socios-de-la-ue-necesitan-que-se-les-preste-atencion/ diff --git a/inc/3rdparty/site_config/standard/lawfareblog.com.txt b/inc/3rdparty/site_config/standard/lawfareblog.com.txt new file mode 100644 index 000000000..49d858a77 --- /dev/null +++ b/inc/3rdparty/site_config/standard/lawfareblog.com.txt @@ -0,0 +1,4 @@ +body: //div[@class='field-items'] +title: //div[@class='title'] + +test_url: https://lawfareblog.com/limits-panopticon diff --git a/inc/3rdparty/site_config/standard/letraslibres.com.txt b/inc/3rdparty/site_config/standard/letraslibres.com.txt new file mode 100644 index 000000000..cf271bca7 --- /dev/null +++ b/inc/3rdparty/site_config/standard/letraslibres.com.txt @@ -0,0 +1,3 @@ +single_page_link: concat(link[@rel="canonical"], "?page=full") + +test_url: http://www.letraslibres.com/revista/dossier/quien-manda-en-europa diff --git a/inc/3rdparty/site_config/standard/naiz.eus.txt b/inc/3rdparty/site_config/standard/naiz.eus.txt new file mode 100644 index 000000000..9e48333ab --- /dev/null +++ b/inc/3rdparty/site_config/standard/naiz.eus.txt @@ -0,0 +1,4 @@ +body: //div[contains(@class,'widget full_article')] + +test_url: http://www.naiz.eus/eu/actualidad/noticia/20151002/adegi-afirma-que-los-jovenes-viven-una-vida-muy-comoda-y-no-tienen-hambre-para-emprender# +test_url: http://www.naiz.eus/eu/actualidad/noticia/20151012/podemos-euskadi-critica-que-otegi-y-sus-companeros-quieran-pasar-por-grandes-pacifistas diff --git a/inc/3rdparty/site_config/standard/pieria.co.uk.txt b/inc/3rdparty/site_config/standard/pieria.co.uk.txt new file mode 100644 index 000000000..31f2c84a4 --- /dev/null +++ b/inc/3rdparty/site_config/standard/pieria.co.uk.txt @@ -0,0 +1,3 @@ +body: //div[@id='article'] + +test_url: http://www.pieria.co.uk/articles/need_a_fiscal_rule_george__try_get_the_economy_growing diff --git a/inc/3rdparty/site_config/standard/popehat.com.txt b/inc/3rdparty/site_config/standard/popehat.com.txt new file mode 100644 index 000000000..45b76ae1d --- /dev/null +++ b/inc/3rdparty/site_config/standard/popehat.com.txt @@ -0,0 +1,6 @@ +title: //div[@class='entry-title'] +author: //div[@class='entry-author'] +date: //div[@class='entry-time'] +body: //div[@class='entry-content'] + +test_url: https://popehat.com/2015/12/16/eric-posner-the-first-amendments-nemesis/ diff --git a/inc/3rdparty/site_config/standard/rasgolatente.es.txt b/inc/3rdparty/site_config/standard/rasgolatente.es.txt new file mode 100644 index 000000000..fcdbbd977 --- /dev/null +++ b/inc/3rdparty/site_config/standard/rasgolatente.es.txt @@ -0,0 +1,6 @@ +title: //div[@class='entry-title'] +author: //div[@class='entry-author'] +date: //div[@class='entry-time'] +body: //div[@class='entry-content'] + +test_url: http://rasgolatente.es/estupidez-psicologia-estupidos/ diff --git a/inc/3rdparty/site_config/standard/thenews.coop.txt b/inc/3rdparty/site_config/standard/thenews.coop.txt new file mode 100644 index 000000000..7d593805b --- /dev/null +++ b/inc/3rdparty/site_config/standard/thenews.coop.txt @@ -0,0 +1,3 @@ +body: //div[@class='entry-content'] + +test_url: http://www.thenews.coop/98221/news/co-operatives/jeremy-corbyn-needs-co-op-movement/ diff --git a/inc/3rdparty/site_config/standard/timeshighereducation.com.txt b/inc/3rdparty/site_config/standard/timeshighereducation.com.txt new file mode 100644 index 000000000..ba52788d3 --- /dev/null +++ b/inc/3rdparty/site_config/standard/timeshighereducation.com.txt @@ -0,0 +1,3 @@ +body: //div[@class="col-md-12 radix-layouts-contentheader panel-panel"] +strip: //div[@class="htmlContent subscribe_box"] +test_url: https://www.timeshighereducation.com/blog/jeremy-corbyn-serious-about-free-higher-education diff --git a/inc/3rdparty/site_config/standard/wired.de.txt b/inc/3rdparty/site_config/standard/wired.de.txt new file mode 100644 index 000000000..da88362fc --- /dev/null +++ b/inc/3rdparty/site_config/standard/wired.de.txt @@ -0,0 +1,8 @@ +title: //meta[@name='Title']/@content +author: //meta[@name='Author']/@content +date: //meta[@name='DisplayDate']/@content +body: //div[@class='article-content'] +strip: //div[@class='article-sidebar'] + +test_url: https://www.wired.de/collection/latest/der-vw-skandal-zeigt-ohne-vertrauen-ist-software-nicht-mehr-als-bose-magie + diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 9014f455f..1476d158a 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -190,7 +190,7 @@ class Poche { case 'add': $content = Tools::getPageContent($url); - $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled'); + $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : parse_url($url, PHP_URL_HOST); $body = $content['rss']['channel']['item']['description']; // clean content from prevent xss attack @@ -908,7 +908,7 @@ class Poche $entries = $this->store->retrieveAllWithTags($this->user->getId()); if ($entries) { echo $this->tpl->render('export.twig', array( - 'export' => Tools::renderJson($entries), + 'export' => Tools::renderJson(Tools::utf8ize($entries)), )); Tools::logm('export view'); } else { diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 9c7483918..263034f07 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -141,7 +141,7 @@ final class Tools public static function getFile($url) { $timeout = 15; - $useragent = "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0"; + $useragent = "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0"; if (in_array ('curl', get_loaded_extensions())) { # Fetch feed from URL @@ -232,6 +232,27 @@ final class Tools exit(); } + /** + * UTF-8 encode array of string + * + * @param $data + */ + public static function utf8ize($data) + { + if (is_array($data)) + { + foreach ($data as $k => $v) + { + $data[$k] = self::utf8ize($v); + } + } + else if (is_string ($data) && '' == mb_detect_encoding($data)) + { + return utf8_encode($data); + } + return $data; + } + /** * Create new line in log file * diff --git a/install/index.php b/install/index.php index f5bce50d1..014fd3b4a 100755 --- a/install/index.php +++ b/install/index.php @@ -704,7 +704,7 @@ php composer.phar install
  • Warning : UTF-8 MB4 is used to fully support unicode characters. It is available only with MySQL starting with version 5.5.3. - Install will failed if you check this while using an older MySQL server.
  • + Install will fail if you check this while using an older MySQL server.
    diff --git a/themes/baggy/_head.twig b/themes/baggy/_head.twig index 9ca51cd2d..e959ec3e1 100755 --- a/themes/baggy/_head.twig +++ b/themes/baggy/_head.twig @@ -45,7 +45,6 @@ {% endblock %} diff --git a/themes/default/_head.twig b/themes/default/_head.twig index e3841c779..2785fd232 100755 --- a/themes/default/_head.twig +++ b/themes/default/_head.twig @@ -42,7 +42,6 @@ {% endblock %}