From e011eed4ca50a5d555aac41428d3a46aa0d9c9f9 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Fri, 6 Jun 2025 17:09:19 +0200 Subject: [PATCH] fix wrong js --- app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php b/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php index cdf3ed5..18f7bf7 100644 --- a/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php +++ b/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php @@ -332,8 +332,9 @@ class InstagramRepostJob extends BrowserJob implements ShouldBeUniqueUntilProces // Add a caption $captionText = $this->descriptionPipeline->process($videoInfo->getDescription()); + $captionText = str_replace('"', '\"', $captionText); $browser->script(" - var el = document.querySelector('div[contenteditable]'), text = '{$captionText}'; + var el = document.querySelector('div[contenteditable]'), text = \"{$captionText}\"; const dataTransfer = new DataTransfer(); dataTransfer.setData('text', text); const event = new ClipboardEvent('paste', {