Skip to content

Commit 459338e

Browse files
author
Jacek Lange
committed
Fix error parsing JSON with quotes in data
1 parent fbcdb41 commit 459338e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Context.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function generate()
5959
{
6060
$properties = $this->getProperties();
6161

62-
return $properties ? "<script type=\"application/ld+json\">" . json_encode($properties,JSON_UNESCAPED_UNICODE) . "</script>" : '';
62+
return $properties ? "<script type=\"application/ld+json\">" . json_encode($properties,JSON_HEX_APOS | JSON_UNESCAPED_UNICODE) . "</script>" : '';
6363
}
6464

6565
/**

0 commit comments

Comments
 (0)