protected function SnippetBuilder::escapeValue in Hotjar 8.2
Same name and namespace in other branches
- 8 src/SnippetBuilder.php \Drupal\hotjar\SnippetBuilder::escapeValue()
Escape value.
1 call to SnippetBuilder::escapeValue()
- SnippetBuilder::buildSnippet in src/
SnippetBuilder.php - Get Hotjar snippet code.
File
- src/
SnippetBuilder.php, line 271
Class
- SnippetBuilder
- Snippet builder service.
Namespace
Drupal\hotjarCode
protected function escapeValue($value) {
return json_encode($value, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT);
}