 
 createDraftSubmit = (problemId, userId, language, code) ->
     code = iconv.decode(new Buffer(code), "latin1")
+    code = entities.encode(code)
     time = new Date
     timeStr = +time
     submit = new Submit

import InformaticsUser from '../informatics/InformaticsUser'

ensureLoggedIn = connectEnsureLogin.ensureLoggedIn("/api/forbidden")

wrap = (fn) ->
    (args...) ->

connectEnsureLogin = require('connect-ensure-login')
passport = require('passport')
iconv = require('iconv-lite')
Entities = require('html-entities').XmlEntities

import User from '../models/user'
import Submit from '../models/submit'
