Avoid URL decoding; remove dead code; add encoding to XML Declaration in php_savefile extension
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2663 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -8,10 +8,9 @@
|
||||
exit;
|
||||
}
|
||||
$svg = $_POST['output_svg'];
|
||||
$filename = (isset($_POST['filename']) && !empty($_POST['filename']) ? preg_replace('@[\\\\/:*?"<>|]@', '_', urldecode($_POST['filename'])) : 'saved') . '.svg'; // These characters are indicated as prohibited by Windows
|
||||
$output_svg = urldecode($svg);
|
||||
$file = $filename;
|
||||
$fh = fopen($file, 'w') or die("Can't open file");
|
||||
fwrite($fh, $output_svg);
|
||||
$filename = (isset($_POST['filename']) && !empty($_POST['filename']) ? preg_replace('@[\\\\/:*?"<>|]@u', '_', $_POST['filename']) : 'saved') . '.svg'; // These characters are indicated as prohibited by Windows
|
||||
|
||||
$fh = fopen($filename, 'w') or die("Can't open file");
|
||||
fwrite($fh, $svg);
|
||||
fclose($fh);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user