forked from ScoDoc/DocScoDoc
Ne quote plus par défaut le HTML des chaines entrants en base
This commit is contained in:
parent
998f28d4a4
commit
97fe4cc73f
@ -287,7 +287,7 @@ class EditableTable(object):
|
||||
input_formators={},
|
||||
aux_tables=[],
|
||||
convert_null_outputs_to_empty=True,
|
||||
html_quote=True,
|
||||
html_quote=False, # changed in 9.0.10
|
||||
fields_creators={}, # { field : [ sql_command_to_create_it ] }
|
||||
filter_nulls=True, # dont allow to set fields to null
|
||||
filter_dept=False, # ajoute selection sur g.scodoc_dept_id
|
||||
@ -321,8 +321,10 @@ class EditableTable(object):
|
||||
del vals["id"]
|
||||
if self.filter_dept:
|
||||
vals["dept_id"] = g.scodoc_dept_id
|
||||
if self.html_quote:
|
||||
quote_dict(vals) # quote all HTML markup
|
||||
if (
|
||||
self.html_quote
|
||||
): # quote all HTML markup (une bien mauvaise idée venue des ages obscurs)
|
||||
quote_dict(vals)
|
||||
# format value
|
||||
for title in vals:
|
||||
if title in self.input_formators:
|
||||
|
@ -221,7 +221,6 @@ _moduleimpl_inscriptionEditor = ndb.EditableTable(
|
||||
def do_moduleimpl_inscription_create(args, formsemestre_id=None):
|
||||
"create a moduleimpl_inscription"
|
||||
cnx = ndb.GetDBConnexion()
|
||||
log("do_moduleimpl_inscription_create: " + str(args))
|
||||
r = _moduleimpl_inscriptionEditor.create(cnx, args)
|
||||
sco_cache.invalidate_formsemestre(
|
||||
formsemestre_id=formsemestre_id
|
||||
|
@ -33,6 +33,7 @@
|
||||
|
||||
En ScoDoc 9, ce n'est pas nécessaire car on est multiptocessus / monothread.
|
||||
"""
|
||||
import html
|
||||
import io
|
||||
import os
|
||||
import queue
|
||||
@ -85,7 +86,11 @@ def SU(s):
|
||||
# car les "combining accents" ne sont pas traités par ReportLab mais peuvent
|
||||
# nous être envoyés par certains navigateurs ou imports
|
||||
# (on en a dans les bases de données)
|
||||
return unicodedata.normalize("NFC", s)
|
||||
s = unicodedata.normalize("NFC", s)
|
||||
# Remplace les entité XML/HTML
|
||||
# reportlab ne les supporte pas non plus.
|
||||
s = html.unescape(s)
|
||||
return s
|
||||
|
||||
|
||||
def _splitPara(txt):
|
||||
|
@ -100,7 +100,7 @@ class MyHttpRequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||
|
||||
if "etapes" in self.path.lower():
|
||||
self.path = str(Path(script_dir / "etapes.xml").relative_to(Path.cwd()))
|
||||
elif "scodocEtudiant" in self.path:
|
||||
elif "scodocEtudiant" in self.path: # API v2
|
||||
# 2 forms: nip=xxx or etape=eee&annee=aaa
|
||||
if "nip" in query_components:
|
||||
nip = query_components["nip"][0]
|
||||
|
Loading…
Reference in New Issue
Block a user