Skip to content

Commit 88af211

Browse files
committed
UI Tag Input: 45126 remove encoding as it is...
...already encoded through the Tag Input code. Else the code is encoded incorrectly. Also strip tags to prevent e.g. JavaScript injections. https://mantis.ilias.de/view.php?id=45126
1 parent 506a217 commit 88af211

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/UI/Implementation/Component/Input/Field/Renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ protected function renderTagField(F\Tag $component): string
373373
if ($value) {
374374
$value = array_map(
375375
function ($v) {
376-
return ['value' => urlencode($this->convertSpecialCharacters($v)), 'display' => $v];
376+
return ['value' => urlencode($v), 'display' => $v];
377377
},
378378
$value
379379
);

src/UI/Implementation/Component/Input/Field/Tag.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ protected function addAdditionalTransformations(): void
7575
if (count($v) == 1 && $v[0] === '') {
7676
return [];
7777
}
78-
return array_map("urldecode", $v);
78+
$array = array_map("urldecode", $v);
79+
return array_map('strip_tags', $array);
7980
}));
8081
}
8182

0 commit comments

Comments
 (0)