Updated to version 2.17.
Use json_encode to write JS variables.