Skip to content

Commit c8d3254

Browse files
committed
title and descriptions are returned html-decoded
1 parent a9e3d55 commit c8d3254

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Adapters/Adapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ public function __get($name)
152152
*/
153153
public function getTitle()
154154
{
155-
return Utils::getFirstValue(Utils::getData($this->providers, 'title')) ?: $this->request->url->getUrl();
155+
return html_entity_decode(Utils::getFirstValue(Utils::getData($this->providers, 'title')) ?: $this->request->url->getUrl());
156156
}
157157

158158
/**
159159
* {@inheritdoc}
160160
*/
161161
public function getDescription()
162162
{
163-
return Utils::getFirstValue(Utils::getData($this->providers, 'description'));
163+
return html_entity_decode(Utils::getFirstValue(Utils::getData($this->providers, 'description')));
164164
}
165165

166166
/**

tests/DevianArtTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public function testOne()
66
$info = Embed\Embed::create('http://www.deviantart.com/art/Misty-510056679');
77

88
$this->assertEquals($info->title, 'Misty');
9-
$this->assertEquals($info->description, 'Face Book llOnline Store ll Tumblr ll Help support me on Patreon and get special perks<3llArtstation I used to watch pokemon when I was younger, and it was  the one...');
9+
$this->assertEquals($info->description, 'Face Book llOnline Store ll Tumblr ll Help support me on Patreon and get special perks<3llArtstation I used to watch pokemon when I was younger, and it was  the one...');
1010
$this->assertEquals($info->imageWidth, 695);
1111
$this->assertEquals($info->imageHeight, 900);
1212
$this->assertEquals($info->type, 'photo');

0 commit comments

Comments
 (0)