1
0
Fork 0
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:
jvoisin 2024-03-05 18:00:21 +01:00 committed by Frédéric Guillot
parent eda2e2f3f5
commit 3d0126be0b
4 changed files with 3502 additions and 51 deletions

File diff suppressed because one or more lines are too long