Trim title of leading/trailing spaces before making filename. Avoids excess hyphens in filename.

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2514 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Adrian Jones 2013-05-30 17:35:48 +00:00
parent 5b641cb5c0
commit f4057ce908
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ svgEditor.addExtension("server_opensave", {
var svg = "<?xml version=\"1.0\"?>\n" + data;
var title = svgCanvas.getDocumentTitle();
var filename = title.replace(/[^a-z0-9\.\_\-]+/gi, '_');
var filename = $.trim(title).replace(/[^a-z0-9\.\_\-]+/gi, '_');
var form = $('<form>').attr({
method: 'post',