For the new record ins3108682 with complex tables names like Figure 3a t(e) CR merged $U \in [250, 350] GeV$ bin, I noticed that the JSON button on the table record (https://www.hepdata.net/record/172708) returns an error "A data submission with record ID 167738, version 1 and table name 'Figure 3a t(e) CR merged bin' does not exist". Similarly if copying the URL for the table to the clipboard and appending &format=json. I think the reason is due to the replacement replace('\\', '%5C') in the lines:
|
table_name=request.args['table'].replace('%', '%25').replace('\\', '%5C'), |
|
table_name = request.args['table'].replace('%', '%25').replace('\\', '%5C') |
|
table_name=ctx['table_name'].replace('%', '%25').replace('\\', '%5C'), |
Testing locally, the JSON links work after removing the replacement. I think the replacement is no longer needed after simplifying the redirect with Flask url_for in commit 5793558 made last August. This should be tested more thoroughly before committing.
For the new record ins3108682 with complex tables names like
Figure 3a t(e) CR merged $U \in [250, 350] GeV$ bin, I noticed that the JSON button on the table record (https://www.hepdata.net/record/172708) returns an error "A data submission with record ID 167738, version 1 and table name 'Figure 3a t(e) CR merged bin' does not exist". Similarly if copying the URL for the table to the clipboard and appending&format=json. I think the reason is due to the replacementreplace('\\', '%5C')in the lines:hepdata/hepdata/modules/records/views.py
Line 111 in 77dc140
hepdata/hepdata/modules/records/api.py
Line 452 in 77dc140
hepdata/hepdata/modules/records/api.py
Line 508 in 77dc140
Testing locally, the JSON links work after removing the replacement. I think the replacement is no longer needed after simplifying the redirect with Flask
url_forin commit 5793558 made last August. This should be tested more thoroughly before committing.