File tree 2 files changed +2
-6
lines changed
tests/3-unit/GlpiPlugin/Formcreator/Field
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 {
108
108
}
109
109
110
110
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 );
116
112
}
117
113
118
114
public function moveUploads () {
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ public function providerGetValueForTargetText() {
401
401
'question ' => $ this ->getQuestion (),
402
402
'value ' => '"><img src=x onerror="alert(1337)" x=x> ' ,
403
403
'expected ' => true ,
404
- 'expectedValue ' => '">< img src=x onerror="alert(1337)" x=x> ' ,
404
+ 'expectedValue ' => '">< img src=x onerror="alert(1337)" x=x> ' ,
405
405
],
406
406
];
407
407
}
You can’t perform that action at this time.
0 commit comments