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-75d572ba1dddmaster
parent
5b641cb5c0
commit
f4057ce908
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue