[BUGFIX] Ensure that the „recover“ message is always in jQuery context 38/56638/5
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 07:36:58 +0000 (09:36 +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/56638
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>

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, [