File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -663,7 +663,9 @@ def DownloadData():
663
663
df .to_csv (buffer , encoding = 'UTF-8' )
664
664
buffer .seek (0 )
665
665
666
- return send_file (buffer , as_attachment = True , download_name = f'{ logical_dev .name } .csv' )
666
+ sanitised_dev_name = re .sub (r'[^a-zA-Z0-9_-]' , '' , logical_dev .name )
667
+
668
+ return send_file (buffer , as_attachment = True , download_name = f'{ sanitised_dev_name } .csv' )
667
669
668
670
669
671
except requests .exceptions .HTTPError as e :
Original file line number Diff line number Diff line change 127
127
dialog . addEventListener ( "close" , doFetch ) ;
128
128
} ) ;
129
129
130
- function exportData ( l_uid , name ) {
131
- console . log ( "exportData " + l_uid + " " + name ) ;
130
+ function exportData ( l_uid ) {
132
131
dialog . returnValue = "Cancel" ;
133
132
dialog . showModal ( ) ;
134
133
@@ -205,7 +204,7 @@ <h3 style="padding: 8px">Export data</h3>
205
204
< div class ="command-bar ">
206
205
< div class ="form-buttons ">
207
206
< ul >
208
- < li > < span class ="btn " onclick ="exportData('{{ ld_data.uid }}', '{{ ld_data.name}}' ) "> Export Data</ span > </ li >
207
+ < li > < span class ="btn " onclick ="exportData('{{ ld_data.uid }}') "> Export Data</ span > </ li >
209
208
< li > < span class ="btn " onclick ="handleSubmit('device-form', 'Are you sure you want to Save?') "> Save</ span > </ li >
210
209
< li > < span class ="btn " onclick ="handleMapping('logical device') "> Update Mapping</ span > </ li >
211
210
< li > < span class ="btn " onclick ="handleEndMapping('{{ ld_data.uid }}', 'LD') "> End Mapping</ span > </ li >
You can’t perform that action at this time.
0 commit comments