You are here

function clientside_validation_drupal_json_encode in Clientside Validation 7

Same name and namespace in other branches
  1. 6 clientside_validation.module \clientside_validation_drupal_json_encode()

File

./clientside_validation.module, line 1355
Add client side validation to forms.

Code

function clientside_validation_drupal_json_encode($var) {
  return str_replace(array(
    '<',
    '>',
    '&',
  ), array(
    '\\u003c',
    '\\u003e',
    '\\u0026',
  ), json_encode($var));
}