Skip to content

Commit

Permalink
[BUGFIX] Strip tags in prepared label from suggest wizard
Browse files Browse the repository at this point in the history
Labels of records provided by the suggest wizard should not contain
any HTML content as they are directly applied as <option> element
to the <select> element of the appropriate database field in backend
forms.

As the suggest wizard may generate such labels in case of stripped
record titles, this commit strips away all HTML tags in order to apply
the labels in a clean way to the appropriate element in the DOM.

Resolves: #89161
Releases: master, 9.5
Change-Id: Ibe5bb81f79c663cf7cfc30bbe896fdf4492c4c3c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61673
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
  • Loading branch information
eliashaeussler authored and georgringer committed Sep 19, 2019
1 parent 7ce1903 commit 3fe7b8f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -195,7 +195,7 @@ public function queryTable(&$params, $recursionCounter = 0)
'text' => '<span class="suggest-label">' . $label . '</span><span class="suggest-uid">[' . $uid . ']</span><br />
<span class="suggest-path">' . $croppedPath . '</span>',
'table' => $this->mmForeignTable ? $this->mmForeignTable : $this->table,
'label' => $label,
'label' => strip_tags($label),
'path' => $path,
'uid' => $uid,
'style' => '',
Expand Down

0 comments on commit 3fe7b8f

Please sign in to comment.