Skip to content
Snippets Groups Projects
Commit 2d3f0c16 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

strip specials from file name in codeblock downloads FS#2757

parent 3002d731
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ class Doku_Renderer_code extends Doku_Renderer {
if(!$language) $language = 'txt';
if(!$filename) $filename = 'snippet.'.$language;
$filename = utf8_basename($filename);
$filename = utf8_stripspecials($filename, '_');
if($this->_codeblock == $INPUT->str('codeblock')){
header("Content-Type: text/plain; charset=utf-8");
......
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