diff --git a/src/scripts/album.js b/src/scripts/album.js index 91be6ad..5eac22b 100644 --- a/src/scripts/album.js +++ b/src/scripts/album.js @@ -257,7 +257,7 @@ album.setTitle = function(albumIDs) { else if (albums.json) oldTitle = albums.json.albums[albumIDs].title; if (!oldTitle) oldTitle = ''; - oldTitle = oldTitle.replace("'", '''); + oldTitle = oldTitle.replace(/'/g, '''); } @@ -329,7 +329,7 @@ album.setTitle = function(albumIDs) { album.setDescription = function(albumID) { - var oldDescription = album.json.description.replace("'", '''), + var oldDescription = album.json.description.replace(/'/g, '''), action; action = function(data) { diff --git a/src/scripts/photo.js b/src/scripts/photo.js index 69e51b0..9a24581 100644 --- a/src/scripts/photo.js +++ b/src/scripts/photo.js @@ -294,7 +294,7 @@ photo.setTitle = function(photoIDs) { // Get old title if only one photo is selected if (photo.json) oldTitle = photo.json.title; else if (album.json) oldTitle = album.json.content[photoIDs].title; - oldTitle = oldTitle.replace("'", '''); + oldTitle = oldTitle.replace(/'/g, '''); } action = function(data) { @@ -477,7 +477,7 @@ photo.setPublic = function(photoID, e) { photo.setDescription = function(photoID) { - var oldDescription = photo.json.description.replace("'", '''), + var oldDescription = photo.json.description.replace(/'/g, '''), action; action = function(data) {