File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3737use Html ;
3838use Session ;
3939use Toolbox ;
40+ use Glpi \Toolbox \Sanitizer ;
4041use Glpi \RichText \RichText ;
4142use Glpi \Application \View \TemplateRenderer ;
4243
@@ -128,12 +129,12 @@ public function serializeValue(): string {
128129 ]
129130 );
130131 $ this ->value = $ input [$ key ];
131- $ this ->value = Html:: entity_decode_deep ($ this ->value );
132+ $ this ->value = Sanitizer:: unsanitize ($ this ->value );
132133 foreach ($ input ['_tag ' ] as $ tag ) {
133134 $ regex = '/<img[^>]+ ' . preg_quote ($ tag , '/ ' ) . '[^<]+>/im ' ;
134135 $ this ->value = preg_replace ($ regex , "# $ tag# " , $ this ->value );
135136 }
136- $ this ->value = Html:: entities_deep ($ this ->value );
137+ $ this ->value = Sanitizer:: sanitize ($ this ->value );
137138 }
138139
139140 return $ this ->value ;
You can’t perform that action at this time.
0 commit comments