@@ -317,9 +317,10 @@ public function testConvertToHexConvert(): void
317317 self ::assertEquals ('#00BFFF ' , Utils::convertToHex ('deep sky blue ' ));
318318 self ::assertEquals ('#FFD700 ' , Utils::convertToHex ('GOLD ' ));
319319 self ::assertEquals ('#B8860B ' , Utils::convertToHex ('darkgoldenrod ' ));
320- self ::assertEquals ('#AABBCC ' , Utils::convertToHex ('#aabbcc ' ));
321- self ::assertEquals ('#AAABBBCCC ' , Utils::convertToHex ('#aaabbbccc ' ));
322- self ::assertEquals ('#DEF ' , Utils::convertToHex ('#def ' ));
320+ self ::assertEquals ('#aabbcc ' , Utils::convertToHex ('#aabbcc ' ));
321+ self ::assertEquals ('#aaabbbccc ' , Utils::convertToHex ('#aaabbbccc ' ));
322+ self ::assertEquals ('#def ' , Utils::convertToHex ('#def ' ));
323+ self ::assertEquals ('#f1A ' , Utils::convertToHex ('#f1A ' ));
323324 }
324325
325326 public function testParseHexColor (): void
@@ -804,7 +805,7 @@ public function testSanitizeSvg(): void
804805 <a xlink:href="javascript:alert(2)">test 2</a>
805806 <a href="#test3">test 3</a>
806807 <a xlink:href="#test">test 4</a>
807-
808+
808809 <a href="data:data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' onload='alert(88)'%3E%3C/svg%3E">test 5</a>
809810 <a xlink:href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' onload='alert(88)'%3E%3C/svg%3E">test 6</a>
810811 <use xlink:href="defs.svg#icon-1"/>
@@ -817,7 +818,7 @@ public function testSanitizeSvg(): void
817818 <this>shouldn't be here</this>
818819 <script>alert(1);</script>
819820 <line fill="none" stroke="#000000" stroke-miterlimit="10" x1="541.54" y1="299.573" x2="543.179" y2="536.458"/>
820-
821+
821822 </svg>
822823 EOF ;
823824 $ clean = Utils::sanitizeSvg ($ dirty );
0 commit comments