File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -610,15 +610,7 @@ protected function filterName(string $name): string
610610 '> ' => '] ' ,
611611 ];
612612
613- $ filtered = filter_var (
614- $ name ,
615- FILTER_SANITIZE_STRING ,
616- FILTER_FLAG_NO_ENCODE_QUOTES
617- );
618-
619- if ($ filtered === false ) {
620- return '' ;
621- }
613+ $ filtered = htmlspecialchars (strip_tags ($ name ), ENT_NOQUOTES );
622614
623615 return trim (strtr ($ filtered , $ rules ));
624616 }
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function testSetFrom()
4848 //filter_var return false
4949 $ mock_filter_var_to_false = true ;
5050 $ e ->setFrom ($ email , $ name );
51- $ expected = '"=?UTF-8?B??=" <> ' ;
51+ $ expected = '"=?UTF-8?B?Bar ?=" <> ' ;
5252 $ this ->assertEquals ($ expected , $ e ->getFrom ());
5353 }
5454
You can’t perform that action at this time.
0 commit comments