From 13bd330d8c95e11a33e005d541f46beb94785783 Mon Sep 17 00:00:00 2001 From: "codeflash-ai[bot]" <148906541+codeflash-ai[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 21:42:29 +0000 Subject: [PATCH] Optimize _has_script_tag_without_src The optimization replaces the string containment check `"` tag to the HTML parser instead of the entire HTML content. **Key changes:** 1. **More efficient early exit**: `find()` returns the index (-1 if not found) which is slightly more efficient than the `in` operator for this use case 2. **Substring parsing**: Instead of parsing the entire HTML document, only parse from the first `