From 3216c462e46a337d82937f57e67d58d43d3cfaa0 Mon Sep 17 00:00:00 2001 From: "Rudolf M. Schreier" Date: Sat, 17 Aug 2019 18:24:04 +0200 Subject: [PATCH] Decode href of HTML element to avoid double escaping. 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 755399f4bad..ea4b2be8047 100644 --- a/bridges/DanbooruBridge.php +++ b/bridges/DanbooruBridge.php @@ -40,7 +40,7 @@ protected function getItemFromElement($element){ 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;