fixing encoding problem on codemirror.js plugin