Skip to content

Commit

Permalink
Add test for special characters in meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mburtscher committed Jul 23, 2014
1 parent 1e8ca13 commit b5d50d1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Fusonic/OpenGraph/Test/ConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,22 @@ public function testCrawlHtmlAudioExceptionDebugOn()

$res = $consumer->loadHtml($content);
}

public function testLoadHtmlSpecialCharacters()
{
$content = <<<LONG
<html>
<head>
<meta property="og:title" content="Apples &amp; Bananas - just &quot;Fruits&quot;">
</head>
<body></body>
</html>
LONG;

$consumer = new Consumer();

$res = $consumer->loadHtml($content);

$this->assertEquals("Apples & Bananas - just \"Fruits\"", $res->title);
}
}

0 comments on commit b5d50d1

Please sign in to comment.