Skip to content
Snippets Groups Projects
Commit d203fa2c authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Sanitizing file names

parent 9af74a9c
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ FileList={ ...@@ -14,7 +14,7 @@ FileList={
var extension=false; var extension=false;
} }
html+='<td class="filename" style="background-image:url('+img+')"><input type="checkbox" />'; html+='<td class="filename" style="background-image:url('+img+')"><input type="checkbox" />';
html+='<a class="name" href="download.php?file='+$('#dir').val()+'/'+name+'"><span class="nametext">'+basename html+='<a class="name" href="download.php?file='+$('#dir').val().replace(/</, '&lt;').replace(/>/, '&gt;')+'/'+name+'"><span class="nametext">'+basename
if(extension){ if(extension){
html+='<span class="extension">'+extension+'</span>'; html+='<span class="extension">'+extension+'</span>';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment