It loops removing the exact token <script>. It never normalises case or whitespace: <script >alert(document.domain)</script> or <ScRiPt>... sails through.
<script>
<script >alert(document.domain)</script>
<ScRiPt>...
RatXSS Dojo · HackXpert Coaching · The XSS Rat · authorized lab use only