Prevent the reader from crashing if the HTML input contains an unmatched closing `</script>` tag. Fixes: #7282