-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't check preconnect links (#1187)
Preconnect links are used to establish a server connection without loading a specific resource yet. Not always do these links point to a URL that should return a 200, and they are not user-facing, i.e. they don't show up in the final rendered version of a page. Therefore, we should not check them at all; not even in `--include-verbatim` mode, as they might not point to a valid resource. This turned out to require a significant overhaul of the html5gum extractor to handle random attribute ordering correctly. Changes to the html5gum extractor: * Refactor HTML link extractor for improved performance and maintainability - Replace Vec<u8> with String for better readability and manipulation - Introduce Element struct to encapsulate element-related data - Use `HashMap<String, String>` for current_attributes for efficient lookups - Add verbatim_stack to properly handle nested verbatim elements - Remove unsafe code where possible, using String::from_utf8_lossy - Improve attribute handling with `HashMap` entry API and prioritize `srcset` - Simplify logic and consolidate verbatim element handling - Enhance encapsulation in `LinkExtractor` struct - Improve overall performance with more efficient data structures - Increase flexibility for future feature additions or modifications Fixes #897
- Loading branch information
Showing
7 changed files
with
306 additions
and
207 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.