From 6a99904e64fb8bad615ac3cdc6caec9ab14a20ca Mon Sep 17 00:00:00 2001 From: "Rudolf M. Schreier" Date: Mon, 26 Aug 2019 14:26:19 +0200 Subject: [PATCH] [DanbooruBridge] Decode href of HTML element to avoid double escaping. (#1262) Directly accessing ...->href resulted in a string that contained '&' instead of '&'. This was later escaped again to '&' in some formats (e.g. Atom). --- bridges/DanbooruBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/DanbooruBridge.php b/bridges/DanbooruBridge.php index 755399f4..ea4b2be8 100644 --- a/bridges/DanbooruBridge.php +++ b/bridges/DanbooruBridge.php @@ -40,7 +40,7 @@ class DanbooruBridge extends BridgeAbstract { defaultLinkTo($element, $this->getURI()); $item = array(); - $item['uri'] = $element->find('a', 0)->href; + $item['uri'] = html_entity_decode($element->find('a', 0)->href); $item['postid'] = (int)preg_replace('/[^0-9]/', '', $element->getAttribute(static::IDATTRIBUTE)); $item['timestamp'] = time(); $thumbnailUri = $element->find('img', 0)->src;