diff --git a/server.js b/server.js index 4cdb98a30..99ef75e08 100644 --- a/server.js +++ b/server.js @@ -1788,7 +1788,9 @@ app.post("/importcharacter", urlencodedParser, async function (request, response } else if (jsonData.name !== undefined) { console.log('importing from v1 json'); jsonData.name = sanitize(jsonData.name); - + if (jsonData.creator_notes) { + jsonData.creator_notes = jsonData.creator_notes.replace("Creator's notes go here.", ""); + } png_name = getPngName(jsonData.name); let char = { "name": jsonData.name, @@ -1811,7 +1813,9 @@ app.post("/importcharacter", urlencodedParser, async function (request, response } else if (jsonData.char_name !== undefined) {//json Pygmalion notepad console.log('importing from gradio json'); jsonData.char_name = sanitize(jsonData.char_name); - + if (jsonData.creator_notes) { + jsonData.creator_notes = jsonData.creator_notes.replace("Creator's notes go here.", ""); + } png_name = getPngName(jsonData.char_name); let char = { "name": jsonData.char_name, @@ -1866,6 +1870,9 @@ app.post("/importcharacter", urlencodedParser, async function (request, response } else if (jsonData.name !== undefined) { console.log('Found a v1 character file.'); console.log(jsonData); + if (jsonData.creator_notes) { + jsonData.creator_notes = jsonData.creator_notes.replace("Creator's notes go here.", ""); + } let char = { "name": jsonData.name, "description": jsonData.description ?? '',