Full-Text RSS 3.8.1

This commit is contained in:
FiveFilters.org 2019-04-04 23:52:03 +02:00
parent 1ec2f36b3e
commit a5a4a192bc
4 changed files with 22 additions and 4 deletions

View File

@ -2,6 +2,10 @@ FiveFilters.org: Full-Text RSS
http://fivefilters.org/content-only/
CHANGELOG
------------------------------------
3.8.1 (2017-10-31)
- Bug fix: Systems with old ICU library produced an idn_to_ascii() error
- Compatibility test file updated to check for DOM extension
3.8 (2017-09-25)
- New site config directive: strip_attr: XPath attribute selector (e.g. //img/@srcset) - remove attribute from element
- New site config directive: insert_detected_image: yes/no (default yes) - places image in og:image in the body if no other images extracted

View File

@ -33,6 +33,7 @@ $allow_url_fopen_ok = (bool)ini_get('allow_url_fopen');
$filter_ok = extension_loaded('filter');
$gumbo_ok = class_exists('Layershifter\Gumbo\Parser');
$idn_ok = function_exists('idn_to_ascii');
$dom_ok = extension_loaded('DOM');
if (extension_loaded('xmlreader')) {
$xml_ok = true;
@ -257,7 +258,12 @@ div.chunk {
<td><a href="http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen">allow_url_fopen</a></td>
<td>Enabled</td>
<td><?php echo ($allow_url_fopen_ok) ? 'Enabled' : 'Disabled'; ?></td>
</tr>
</tr>
<tr class="<?php echo ($dom_ok) ? 'enabled' : 'disabled'; ?>">
<td><a href="http://php.net/manual/en/book.dom.php">DOM / XML extension</a></td>
<td>Enabled</td>
<td><?php echo ($dom_ok) ? 'Enabled' : 'Disabled'; ?></td>
</tr>
</tbody>
</table>
</div>
@ -265,7 +271,7 @@ div.chunk {
<div class="chunk">
<h3>What does this mean?</h3>
<ol>
<?php if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $zlib_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?>
<?php if ($php_ok && $xml_ok && $pcre_ok && $dom_ok && $mbstring_ok && $iconv_ok && $filter_ok && $zlib_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?>
<li>You have everything you need to run <?php echo $app_name; ?> properly! Congratulations!</li>
<?php else: ?>
<?php if ($php_ok): ?>

View File

@ -270,7 +270,11 @@ class HumbleHttpAgent
public function convertIdn($url) {
if (function_exists('idn_to_ascii')) {
if ($host = @parse_url($url, PHP_URL_HOST)) {
$puny = idn_to_ascii($host, 0, INTL_IDNA_VARIANT_UTS46);
if (defined('INTL_IDNA_VARIANT_UTS46')) {
$puny = idn_to_ascii($host, 0, INTL_IDNA_VARIANT_UTS46);
} else {
$puny = idn_to_ascii($host);
}
if ($host != $puny) {
$pos = strpos($url, $host);
if ($pos !== false) {

View File

@ -1254,7 +1254,11 @@ function get_self_url() {
function validate_url($url) {
if (function_exists('idn_to_ascii')) {
if ($host = @parse_url($url, PHP_URL_HOST)) {
$puny = idn_to_ascii($host, 0, INTL_IDNA_VARIANT_UTS46);
if (defined('INTL_IDNA_VARIANT_UTS46')) {
$puny = idn_to_ascii($host, 0, INTL_IDNA_VARIANT_UTS46);
} else {
$puny = idn_to_ascii($host);
}
if ($host != $puny) {
$pos = strpos($url, $host);
if ($pos !== false) {