From b7565cc4d14400643faf2d2871824ce1c40f72c1 Mon Sep 17 00:00:00 2001 From: mic Date: Mon, 14 Apr 2025 22:16:52 +0200 Subject: [PATCH] Fix JSON stringification of original text in openChatGPT function. see #344 --- mzta-background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mzta-background.js b/mzta-background.js index 1e027f32..035de46d 100644 --- a/mzta-background.js +++ b/mzta-background.js @@ -366,7 +366,7 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_ let mztaGPTModel="`+ _gpt_model +`"; let mztaDoDebug="`+(prefs.do_debug?'1':'0')+`"; let mztaUseDiffViewer="`+(prompt_info.use_diff_viewer=='1'?'1':'0')+`"; - let mztaOriginalText="`+ originalText +`"; + let mztaOriginalText="`+ JSON.stringify(originalText).slice(1, -1) +`"; `; taLog.log("Waiting 1 sec");