mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Speed the sanitizer up a bit, again
- allow youtube urls to start with `www` - use `strings.Builder` instead of a `bytes.Buffer` - use a `strings.NewReader` instead of a `bytes.NewBufferString` - sprinkles a couple of `continue` to make the code-flow more obvious - inline calls to `inList`, and put their parameters in the right order - simplify isPixelTracker - simplify `isValidIframeSource`, by extracting the hostname and comparing it directly, instead of using the full url and checking if it starts with multiple variations of the same one (`//`, `http:`, `https://` multiplied by ``/`www.`) - add a benchmark
This commit is contained in:
parent
eda2e2f3f5
commit
3d0126be0b
4 changed files with 3502 additions and 51 deletions
2635
internal/reader/sanitizer/testdata/miniflux_github.html
vendored
Normal file
2635
internal/reader/sanitizer/testdata/miniflux_github.html
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue