I’m getting the following error from the generated safecracker js:
Uncaught SyntaxError: Unexpected token ILLEGAL
(or in Safari “SyntaxError: Invalid character ‘\u65533’”)
// <![CDATA[
$(document).ready(function() {
if (typeof SafeCracker == "undefined" || ! SafeCracker) { var SafeCracker = {markItUpFields:Bud1% @};}
});
// ]]>Looking at the generated code, there are some unexpected characters inserted, ie. “Bud1% @”
In the source, line #137 of safecracker_lib.php gives
$this->EE->javascript->output('if (typeof SafeCracker == "undefined" || ! SafeCracker) { var SafeCracker = {markItUpFields:{}};}');But this is obviously not translating to the view.
I’m using
ExpressionEngine: 2.4.0 Build 20120123
Safecracker: 2.1
I’ve tried upgrading to 2.5 and had no luck there either.
What causes this issue and how can I rectify it?