From b5fe5641f106404e860560a36588964112559d14 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Sun, 18 Mar 2007 18:06:19 +0000 Subject: [PATCH] escapeo la comilla simple que rompia el JS al editar un curso --- sercom/subcontrollers/curso/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.43.0