diff --git a/changelog.txt b/changelog.txt
index c66978a..08b9f0c 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -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
diff --git a/ftr_compatibility_test.php b/ftr_compatibility_test.php
index 4ce9161..100b982 100644
--- a/ftr_compatibility_test.php
+++ b/ftr_compatibility_test.php
@@ -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 {
allow_url_fopen |
Enabled |
|
-
+
+
+ DOM / XML extension |
+ Enabled |
+ |
+
@@ -265,7 +271,7 @@ div.chunk {
What does this mean?
-
+
- You have everything you need to run properly! Congratulations!
diff --git a/libraries/humble-http-agent/HumbleHttpAgent.php b/libraries/humble-http-agent/HumbleHttpAgent.php
index db0040d..3b8adc9 100644
--- a/libraries/humble-http-agent/HumbleHttpAgent.php
+++ b/libraries/humble-http-agent/HumbleHttpAgent.php
@@ -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) {
diff --git a/makefulltextfeed.php b/makefulltextfeed.php
index 7592bf3..5289a83 100644
--- a/makefulltextfeed.php
+++ b/makefulltextfeed.php
@@ -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) {