I’m getting a “Parse error: syntax error, unexpected T_STRING… Functions.php(650) : eval()‘d code on line 76” error message and I believe I’ve distilled the issue down to a bit of Javascript code from Google’s Analytics.
Here’s the JS code snippet:
onClick=”[removed] _gaq.push([‘_trackPageview’, ‘/downloads/{title}’);”
And here’s the strange part:
(1) I have a multilingual site
(2) I have custom fields for displaying English and Chinese in all my Channels
(3) I get no error message when using that JS snipped above in the English-language fields
(4) Error message shows up when using that same JS snippet in a Chinese-language field or field with Chinese characters in them
I’m thinking it’s the apostrophe in the JS that’s tripping the error message? Is there a way to escape them?
Using EE 2.1.3 and the fields in question are EE stock textarea fields with formatting buttons turned on.
Help?