Skip to content

Commit

Permalink
[DanbooruBridge] Decode href of HTML element to avoid double escaping. (
Browse files Browse the repository at this point in the history
RSS-Bridge#1262)

Directly accessing ...->href resulted in a string that contained '&'
instead of '&'. This was later escaped again to '&' in some
formats (e.g. Atom).
  • Loading branch information
Rudolf M. Schreier authored and teromene committed Aug 26, 2019
1 parent 86c2b1d commit 8728af1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bridges/DanbooruBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8728af1

Please sign in to comment.