You are here

protected function SnippetBuilder::escapeValue in Hotjar 8

Same name and namespace in other branches
  1. 8.2 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 209

Class

SnippetBuilder
Class SnippetBuilder.

Namespace

Drupal\hotjar

Code

protected function escapeValue($value) {
  return json_encode($value, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT);
}