Commit 3a4698a9 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

server: name encoding

Safe encoding for first names and last names systematically.
Not only when we cannot view the full names.
parent fab1dccd
......@@ -105,8 +105,10 @@ def anon_names(patient_id, first_name, last_name, can_view=None):
'''
auth=current.auth
ln = safe_encoding(last_name)
fn = safe_encoding(first_name)
if can_view or (can_view == None and auth.can_view_patient_info(patient_id)):
name = last_name + " " + first_name
name = ln + " " + fn
else:
ln = safe_encoding(last_name)
name = ln[:3]
......
......@@ -205,8 +205,6 @@
<div class="db_block_right">
{{if fused_file is not None :}}
download {{=db.config[config_id].name}}
{{fused_filename = vidjil_utils.safe_encoding(fused_filename)}}
{{analysis_filename = vidjil_utils.safe_encoding(analysis_filename)}}
<a class="button" href={{=URL('default', 'download', scheme='https', args=fused_file[0].fused_file, vars=dict(filename=fused_filename))}} type="application/octet-stream" download> .data </a>
{{if analysis_count >0:}}
<a class="button" href={{=URL('default', 'download', scheme='https', args=analysis_file[0].analysis_file, vars=dict(filename=analysis_filename))}} type="application/octet-stream" download> .analysis </a>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment