You are here

function clientside_validation_drupal_json_encode in Clientside Validation 6

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

File

./clientside_validation.module, line 1010
Add client side validation to a webform.

Code

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