Commit a1891ad5 authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Anja Leichsenring
Browse files

[BUGFIX] Render upgrade wizard description in confirmation step

To keep its context, an upgrade wizard's description is now rendered in
the confirmation step. All possibly exising HTML is removed and line
breaks get converted to <br> tags.

Resolves: #94514
Releases: master, 10.4
Change-Id: Ic0e5a75b996ea21427d40ff573715c8c153db867
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69767

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent c671a1c5
......@@ -48,6 +48,7 @@ class UpgradeWizards extends AbstractInteractableModule {
private selectorWizardsListRowExecute: string = '.t3js-upgradeWizards-list-row-execute';
private selectorWizardsInputTemplate: string = '.t3js-upgradeWizards-input';
private selectorWizardsInputTitle: string = '.t3js-upgradeWizards-input-title';
private selectorWizardsInputDescription: string = '.t3js-upgradeWizards-input-description';
private selectorWizardsInputHtml: string = '.t3js-upgradeWizards-input-html';
private selectorWizardsInputPerform: string = '.t3js-upgradeWizards-input-perform';
private selectorWizardsInputAbort: string = '.t3js-upgradeWizards-input-abort';
......@@ -349,6 +350,7 @@ class UpgradeWizards extends AbstractInteractableModule {
input.find(this.selectorWizardsInputHtml).html(data.userInput.wizardHtml);
}
input.find(this.selectorWizardsInputTitle).text(data.userInput.title);
input.find(this.selectorWizardsInputDescription).html(this.securityUtility.stripHtml(data.userInput.description).replace(/\n/g, '<br>'));
input.find(this.selectorWizardsInputPerform)
.attr('data-identifier', data.userInput.identifier)
.attr('data-title', data.userInput.title);
......
......@@ -348,6 +348,7 @@ class UpgradeWizardsService
$result = [
'identifier' => $identifier,
'title' => $updateObject->getTitle(),
'description' => $updateObject->getDescription(),
'wizardHtml' => $wizardHtml,
];
......
......@@ -61,6 +61,7 @@
<div class="t3js-upgradeWizards-input">
<form>
<h4 class="t3js-upgradeWizards-input-title">{updateData.title}</h4>
<p class="t3js-upgradeWizards-input-description">{updateData.description}</p>
<div class="t3js-upgradeWizards-input-html"></div>
<button class="btn btn-warning t3js-upgradeWizards-input-perform" type="button">
Perform updates!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment