From: Ricardo Markiewicz Date: Sun, 18 Mar 2007 18:06:19 +0000 (+0000) Subject: escapeo la comilla simple que rompia el JS al editar un curso X-Git-Tag: 0_9_0~31 X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/commitdiff_plain/b5fe5641f106404e860560a36588964112559d14 escapeo la comilla simple que rompia el JS al editar un curso --- diff --git a/sercom/subcontrollers/curso/__init__.py b/sercom/subcontrollers/curso/__init__.py index 20c2310..b9ce585 100644 --- a/sercom/subcontrollers/curso/__init__.py +++ b/sercom/subcontrollers/curso/__init__.py @@ -225,8 +225,8 @@ class CursoController(controllers.Controller, identity.SecureResource): """Edit record in model""" r = validate_get(id) # cargo la lista con los docentes asignados al curso - r.docentes_to = [{"id":d.docente.id, "label":d.docente.shortrepr()} for d in r.docentes] - r.alumnos_inscriptos = [{"id":a.alumno.id, "label":a.alumno.shortrepr()} for a in r.alumnos] + r.docentes_to = [{"id":d.docente.id, "label":d.docente.shortrepr().replace("'", "\\'")} for d in r.docentes] + r.alumnos_inscriptos = [{"id":a.alumno.id, "label":a.alumno.shortrepr().replace("'", "\\'")} for a in r.alumnos] return dict(name=name, namepl=namepl, record=r, form=form) @validate(form=form)