From c9b0cd1315bbc8bcf1d85c4512b8bb0fdca8271a Mon Sep 17 00:00:00 2001 From: somini Date: Thu, 4 Apr 2019 21:48:25 +0100 Subject: [PATCH] ComboiosDePortugalBridge: HACK: Encode the URL (#1074) This seems like a weird bug somewhere. Either the HTML parser should return the valid page, or the CMS should not convert the URL first, or the URL validation regex is buggy. --- bridges/ComboiosDePortugalBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/ComboiosDePortugalBridge.php b/bridges/ComboiosDePortugalBridge.php index 4d82881f..610e23b3 100644 --- a/bridges/ComboiosDePortugalBridge.php +++ b/bridges/ComboiosDePortugalBridge.php @@ -14,7 +14,7 @@ class ComboiosDePortugalBridge extends BridgeAbstract { $item = array(); $item['title'] = $element->innertext; - $item['uri'] = self::BASE_URI . $element->href; + $item['uri'] = self::BASE_URI . implode('/', array_map('urlencode', explode('/', $element->href))); $this->items[] = $item; }