From 0f67ee33aeb425efe8962e03369f1f2322c7eb9e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 20 Oct 2021 23:18:00 +0200 Subject: [PATCH] Fix etud_info xml/json quote --- app/views/scolar.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/views/scolar.py b/app/views/scolar.py index 74e80a1a..38f63f06 100644 --- a/app/views/scolar.py +++ b/app/views/scolar.py @@ -415,12 +415,10 @@ def etud_info(etudid=None, format="xml"): "codelycee", "date_naissance_iso", ): - d[a] = scu.quote_xml_attr(etud[a]) - d["civilite"] = scu.quote_xml_attr( - etud["civilite_str"] - ) # exception: ne sort pas la civilite brute + d[a] = etud[a] # ne pas quoter car ElementTree.tostring quote déjà + d["civilite"] = etud["civilite_str"] # exception: ne sort pas la civilite brute d["sexe"] = d["civilite"] # backward compat pour anciens clients - d["photo_url"] = scu.quote_xml_attr(sco_photos.etud_photo_url(etud)) + d["photo_url"] = sco_photos.etud_photo_url(etud) sem = etud["cursem"] if sem: @@ -431,10 +429,8 @@ def etud_info(etudid=None, format="xml"): "formsemestre_id": sem["formsemestre_id"], "date_debut": ndb.DateDMYtoISO(sem["date_debut"]), "date_fin": ndb.DateDMYtoISO(sem["date_fin"]), - "etat": scu.quote_xml_attr(sem["ins"]["etat"]), - "groupes": scu.quote_xml_attr( - etud["groupes"] - ), # slt pour semestre courant + "etat": sem["ins"]["etat"], + "groupes": etud["groupes"], # slt pour semestre courant } ] else: @@ -446,7 +442,7 @@ def etud_info(etudid=None, format="xml"): "formsemestre_id": sem["formsemestre_id"], "date_debut": ndb.DateDMYtoISO(sem["date_debut"]), "date_fin": ndb.DateDMYtoISO(sem["date_fin"]), - "etat": scu.quote_xml_attr(sem["ins"]["etat"]), + "etat": sem["ins"]["etat"], } )