From ad127f4739b06f59cd3fe06774e0c32d2a0b1111 Mon Sep 17 00:00:00 2001 From: Raroun Date: Fri, 5 May 2023 19:30:26 +0200 Subject: [PATCH] Fixes #13082 removed $.trim because it removes \n from return value of media/photo/upload --- view/js/dropzone-factory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/js/dropzone-factory.js b/view/js/dropzone-factory.js index 4f14551be8..e0f8e47253 100644 --- a/view/js/dropzone-factory.js +++ b/view/js/dropzone-factory.js @@ -26,10 +26,10 @@ var DzFactory = function (max_imagesize) { const targetTextarea = document.getElementById(textareaElementId); if (targetTextarea.setRangeText) { //if setRangeText function is supported by current browser - targetTextarea.setRangeText(' ' + $.trim(serverResponse) + ' '); + targetTextarea.setRangeText(' ' + serverResponse + ' '); } else { targetTextarea.focus(); - document.execCommand('insertText', false /*no UI*/, '\n' + $.trim(serverResponse) + '\n'); + document.execCommand('insertText', false /*no UI*/, '\n' + serverResponse + '\n'); } }); this.on('complete', function(file) { -- 2.39.5