File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
tests/3-unit/GlpiPlugin/Formcreator/Field Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,7 @@ public function getValueForDesign(): string {
108108 }
109109
110110 public function getValueForTargetText ($ domain , $ richText ): ?string {
111- if ($ richText ) {
112- return Sanitizer::encodeHtmlSpecialChars ($ this ->value );
113- }
114-
115- return $ this ->value ;
111+ return Sanitizer::encodeHtmlSpecialChars ($ this ->value );
116112 }
117113
118114 public function moveUploads () {
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ public function providerGetValueForTargetText() {
401401 'question ' => $ this ->getQuestion (),
402402 'value ' => '"><img src=x onerror="alert(1337)" x=x> ' ,
403403 'expected ' => true ,
404- 'expectedValue ' => '">< img src=x onerror="alert(1337)" x=x> ' ,
404+ 'expectedValue ' => '">< img src=x onerror="alert(1337)" x=x> ' ,
405405 ],
406406 ];
407407 }
You can’t perform that action at this time.
0 commit comments