From bf3877bce8ed6176e41b850279affba87d080057 Mon Sep 17 00:00:00 2001 From: Michael Aschauer Date: Tue, 2 Oct 2018 11:19:27 +0200 Subject: [PATCH] prepare for remix history --- stitchcode/gui.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stitchcode/gui.js b/stitchcode/gui.js index f17c2dc7..70b4c2b6 100644 --- a/stitchcode/gui.js +++ b/stitchcode/gui.js @@ -1081,12 +1081,14 @@ IDE_Morph.prototype.downloadDST = function() { IDE_Morph.prototype.setProjectName = function (string) { - if (string != this.projectName && SnapCloud.username != this.creator) { + if (string.replace(/['"]/g, '') != this.projectName && SnapCloud.username != this.creator) { this.remixHistory = this.creator + ":" + this.projectName + ";" + this.remixHistory } this.origCreator = SnapCloud.username != this.creator ? this.creator : SnapCloud.username; this.creator = SnapCloud.username ? SnapCloud.username : "anonymous"; - this.origName = this.projectName; + if (string.replace(/['"]/g, '') != this.projectName) { + this.origName = this.projectName; + } this.projectName = string.replace(/['"]/g, ''); // filter quotation marks this.hasChangedMedia = true; this.controlBar.updateLabel();