Skip to content
Commit bf774b63 authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Morton Jonuschat
Browse files

[BUGFIX] Convert colPos in backend layout wizard to number

The method `setColumn` in the backend layout wizard sanitizes the
value by wrapping it into a <p> tag and fetching its text which strips
off any HTML. This returns a string.

However, the code later checks after performing a save action whether
the value is a number. The value gets converted to a number in
`setColumn` to recover the functionality.

Change-Id: I686657e170668adf71f278fa537aa5510e3e2241
Resolves: #73656
Releases: master
Reviewed-on: https://review.typo3.org/46880


Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
parent c21506d3
Branches
Tags
No related merge requests found
...@@ -326,7 +326,9 @@ define(['jquery', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Severity', 'boot ...@@ -326,7 +326,9 @@ define(['jquery', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Severity', 'boot
*/ */
GridEditor.setName = function(newName, col, row) { GridEditor.setName = function(newName, col, row) {
var cell = GridEditor.getCell(col, row); var cell = GridEditor.getCell(col, row);
if (!cell) return false; if (!cell) {
return false;
}
cell.name = GridEditor.stripMarkup(newName); cell.name = GridEditor.stripMarkup(newName);
return true; return true;
}; };
...@@ -346,7 +348,7 @@ define(['jquery', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Severity', 'boot ...@@ -346,7 +348,7 @@ define(['jquery', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Severity', 'boot
if (!cell) { if (!cell) {
return false; return false;
} }
cell.column = GridEditor.stripMarkup(newColumn); cell.column = parseInt(GridEditor.stripMarkup(newColumn), 10);
return true; return true;
}; };
......
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