[BUGFIX] Adjust modal window processing 09/59109/2
authorOliver Hader <oliver@typo3.org>
Tue, 11 Dec 2018 12:16:44 +0000 (13:16 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 11 Dec 2018 12:31:21 +0000 (13:31 +0100)
Resolves: #87123
Releases: master, 8.7, 7.6
Change-Id: Idceecb174682261b967ea284e12e1836bb7e7bea
Reviewed-on: https://review.typo3.org/59109
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/Modal.js

index 33aef80..0704f2f 100644 (file)
@@ -199,9 +199,12 @@ define(['jquery',
                if (typeof content === 'object') {
                        currentModal.find('.modal-body').append(content);
                } else {
-                       content = $('<p />').html(
-                               securityUtility.encodeHtml(content)
-                       );
+                       // we need html, check if we have to wrap content in <p>
+                       if (!/^<[a-z][\s\S]*>/i.test(content)) {
+                               content = $('<p />').html(
+                                       securityUtility.encodeHtml(content)
+                               );
+                       }
                        currentModal.find('.modal-body').html(content);
                }