8000 [pull] main from miniflux:main by pull[bot] · Pull Request #223 · suhaoGe/miniflux · GitHub
[go: up one dir, main page]

Skip to content

[pull] main from miniflux:main - #223

Merged
pull[bot] merged 2 commits into
suhaoGe:mainfrom
miniflux:main
Jan 30, 2026
Merged

pull[bot] merged 2 commits into
suhaoGe:mainfrom
miniflux:main

Conversation

@pull
@pull pull Bot commented Jan 30, 2026 •
Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jvoisin and others added 2 commits January 29, 2026 20:36
As stated in [golang.org/x/net/html's documentation](https://pkg.go.dev/golang.org/x/net):

> If your use case requires semantically well-formed HTML documents, as defined
by the WHATWG specification, the parser should be used rather than the
tokenizer.

The sanitizer is modifying the HTML document, and I'm pretty sure we don't want
to implement a WHATWG-compliant parser ourself, as there are _so many_
edge cases everywhere. Picking the parser instead of the tokenizer ensures that
miniflux has the same view of the DOM than web browsers, removing the risk of
disparities, and thus injection-related security issues. Another benefit of
this commit is to make the code way more readable/simple.

The only changes made to the testsuites are:

- Removing the trailing `/` on self-contained tags, as the spec doesn't require
  them. Adding them systematically could also have been done, but as the
  testsuite isn't consistent in this regard, it would have significantly
  increased the size of the commit to normalize it.
- Some weird things that were wrong in the first place, like how
  `<td rowspan="<b>injection</b>">text</td>` is interpreted by the browser as
  `text`, and not as `<td rowspan="&lt;b&gt;test&lt;/b&gt;">test</td>`.

Care has been taken to re-use as much code from the tokenizer-based sanitizer
as possible.
…ribute

The browser will do the right thing by default even if the image width
is larger than Miniflux's layout.
@pull pull Bot locked and limited conversation to collaborators Jan 30, 2026
@pull pull Bot added the ⤵️ pull label Jan 30, 2026
@pull
pull Bot merged commit 89638b4 into suhaoGe:main Jan 30, 2026
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0