[BUGFIX] Ensure that the „recover“ message is always in jQuery context 74/56674/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 12 Apr 2018 12:45:26 +0000 (14:45 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Mon, 16 Apr 2018 17:30:45 +0000 (19:30 +0200)
When a page is about to get recovered by the recycler, a checkbox is
rendered into the modal text, which requires propert jQuery object.

However, if that checkbox is not required, a simple string is stored in
the `$message` variable, breaking functionality as a jQuery object is
expected. The message is now wrapped in a `<p>` tag to always have a
jQuery object in place.

Resolves: #84701
Relases: master, 8.7
Change-Id: Ie534380aa4be9800ce2754e0226ee52ee9ce5dc1
Reviewed-on: https://review.typo3.org/56674
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/recycler/Resources/Public/JavaScript/Recycler.js

index 1128c58..2c9f890 100644 (file)
@@ -427,7 +427,7 @@ define(['jquery',
         )
       );
     } else {
-      $message = messageText;
+      $message = $('<p />').text(messageText);
     }
 
     Modal.confirm(TYPO3.lang['modal.undo.header'], $message, Severity.ok, [