[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).
This commit is contained in:
Rudolf M. Schreier 2019-08-26 14:26:19 +02:00 committed by Lyra
parent f3c687604f
commit 6a99904e64

View file

@ -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;