Skip to content

chore(deps): update html-pipeline requirement from ~> 1.0 to ~> 3.2#2061

Merged
zkoppert merged 4 commits into
masterfrom
dependabot/bundler/html-pipeline-3.2.4
Jun 9, 2026
Merged

chore(deps): update html-pipeline requirement from ~> 1.0 to ~> 3.2#2061
zkoppert merged 4 commits into
masterfrom
dependabot/bundler/html-pipeline-3.2.4

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 13, 2026

Copy link
Copy Markdown
Contributor

Maintainer notes (added by @zkoppert)

Why

html-pipeline 3.x is a major rewrite of the API and swaps the underlying sanitizer from the sanitize gem to Selma. Dependabot's mechanical bump bumps the gemspec but leaves the test harness broken. I rebased the branch on the new master (post-#2072) and migrated test/markup_test.rb so we can actually validate the upgrade.

Scope: this is a test-harness change

github-markup itself does no sanitization. From the README:

markup itself does no sanitization of the resulting HTML, as it expects that to be covered by whatever pipeline is consuming the HTML.

html-pipeline is purely a development/test dependency here. It is not required from lib/ and not loaded at runtime. Its only job is to simulate a downstream rendering pipeline so the fixture tests can sanity-check that the gem's HTML output composes cleanly with a typical consumer.

Impact on actual consumers of this gem: none. The gem's output is unchanged.

Impact on GitHub.com specifically: none. GitHub.com uses its own internal pipeline (Goomba), not html-pipeline, and does not include html-pipeline in its dependency tree.

What changed

  • Test harness migrated to the v3 API (commit 635bd18):
    • require 'html/pipeline'require 'html_pipeline'
    • HTML::Pipeline::Filter subclass → HTMLPipeline::ConvertFilter subclass with an instance-based def call(_text, context:)
    • Pipeline.to_html(nil, filename: readme)Pipeline.call("", context: { filename: readme })[:output].to_s
  • Fixtures regenerated via UPDATE=1 bundle exec rake test (commit e7beefb). 13 files in test/markups/ changed because Selma's DEFAULT_CONFIG sanitizes differently from the old sanitize-gem-backed defaults. These differences are properties of HTMLPipeline::SanitizationFilter::DEFAULT_CONFIG, not of this library.
  • Dropped unused sanitize gem dev dependency (commit dea1788, caught by Copilot's review): v3 uses Selma, and nothing in this repo requires the sanitize gem directly.

Test-harness behavior differences worth knowing about

These are differences in how the test harness's downstream pipeline sanitizes the gem's output. They are not changes in this gem's behavior. They are recorded here as reference for anyone reading the regenerated fixtures or chaining html-pipeline v3 themselves.

  • Heading, div, span, and caption id attributes are now preserved (TOC anchors flow through cleanly).
  • <a> tags with bare-filename relative hrefs (e.g., href="rawr.html", href="Home") get the href stripped by Selma's default protocol allowlist. Path-absolute (/foo), dot-prefixed (./foo, ../foo), anchor (#foo), and absolute URLs are all preserved. Visible in README.rdoc.html, README.asciidoc.html, README.mediawiki.html.
  • Cosmetic: <br> serializes as <br/>, non-ASCII glyphs in text become numeric entities (&#10063;), minor whitespace differences inside <ul> and <tr>.

Testing

  • bundle exec rake test: 62 runs, 62 pass, 0 failures.
  • Coverage holds at 100% line + 100% branch (enforced by the SimpleCov config from Add 100% test coverage floor with SimpleCov #2072).
  • Manually verified that no <script>, javascript:, onX= event handlers, or other XSS vectors leaked into any regenerated fixture.
  • Self-reviewed with three code-review agents (opus, sonnet, gpt-5) running in parallel. All three converged on the same single verified finding (bare-filename href stripping documented above) and verified no other issues.

Rollout

  • No production behavior change for consumers of this gem.
  • GitHub.com is unaffected (uses Goomba, not html-pipeline).
  • Anyone who happens to chain github-markuphtml-pipeline v3 in their own stack will see the differences listed above. That is an html-pipeline v3 migration concern for them, independent of this PR.

Updates the requirements on html-pipeline to permit the latest version.

Release notes

Sourced from html-pipeline's releases.

v3.2.4

What's Changed

Full Changelog: gjtorikian/html-pipeline@v3.2.3...v3.2.4

v3.2.3

What's Changed

Full Changelog: gjtorikian/html-pipeline@v3.2.2...v3.2.3

v3.2.2

What's Changed

New Contributors

Full Changelog: gjtorikian/html-pipeline@v3.2.1...v3.2.2

v3.2.1

What's Changed

New Contributors

Full Changelog: gjtorikian/html-pipeline@v3.2.0...v3.2.1

v3.2.0

What's Changed

Full Changelog: gjtorikian/html-pipeline@v3.1.1...v3.2.0

... (truncated)

Changelog

Sourced from html-pipeline's changelog.

[v3.2.4] - 06-01-2026

What's Changed

Full Changelog: gjtorikian/html-pipeline@v3.2.3...v3.2.4

[v3.2.3] - 24-04-2025

What's Changed

Full Changelog: gjtorikian/html-pipeline@v3.2.2...v3.2.3

[v3.2.2] - 09-08-2024

What's Changed

New Contributors

Full Changelog: gjtorikian/html-pipeline@v3.2.1...v3.2.2

[v3.2.1] - 16-07-2024

What's Changed

Full Changelog: gjtorikian/html-pipeline@v3.2.0...v3.2.1

[v3.2.0] - 30-04-2024

What's Changed

Full Changelog: gjtorikian/html-pipeline@v3.1.1...v3.2.0

[v3.1.1] - 09-04-2024

What's Changed

Full Changelog: gjtorikian/html-pipeline@v3.1.0...v3.1.1

[v3.1.0] - 28-02-2024

What's Changed

New Contributors

... (truncated)

Commits
  • c99d76d Merge pull request #429 from gjtorikian/release/v3.2.4
  • f00ac92 [skip test] update changelog
  • 4bd9392 Merge pull request #428 from gjtorikian/allow-for-sanitization-nil
  • 7a75c3e 💎 bump to 3.2.4
  • 973cbef add minitest/mock for stubs
  • f75cd21 Merge branch 'main' into allow-for-sanitization-nil
  • 7a6e748 Merge pull request #427 from gjtorikian/support-ruby-4
  • 251dde6 loosen commonmarker
  • a1b66f0 no need for this
  • 1b5c5fb [auto-lint]: Lint files
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels May 13, 2026
@zkoppert

Copy link
Copy Markdown
Member

@dependabot rebase

@dependabot dependabot Bot force-pushed the dependabot/bundler/html-pipeline-3.2.4 branch 3 times, most recently from 3f10ca2 to 7ea3cf9 Compare May 14, 2026 08:24
@dependabot dependabot Bot force-pushed the dependabot/bundler/html-pipeline-3.2.4 branch 2 times, most recently from 10095d0 to 41166ac Compare June 6, 2026 16:48
@zkoppert

zkoppert commented Jun 8, 2026

Copy link
Copy Markdown
Member

@dependabot rebase

1 similar comment
@zkoppert

zkoppert commented Jun 8, 2026

Copy link
Copy Markdown
Member

@dependabot rebase

@dependabot @github

dependabot Bot commented on behalf of github Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Dependabot can't evaluate your Ruby dependency files. Because of this, Dependabot cannot update this pull request.

@zkoppert zkoppert force-pushed the dependabot/bundler/html-pipeline-3.2.4 branch from 41166ac to afe769c Compare June 8, 2026 07:09
dependabot Bot and others added 3 commits June 8, 2026 16:17
Updates the requirements on [html-pipeline](https://github.com/gjtorikian/html-pipeline) to permit the latest version.
- [Release notes](https://github.com/gjtorikian/html-pipeline/releases)
- [Changelog](https://github.com/gjtorikian/html-pipeline/blob/main/CHANGELOG.md)
- [Commits](gjtorikian/html-pipeline@v1.11.0...v3.2.4)

---
updated-dependencies:
- dependency-name: html-pipeline
  dependency-version: 3.2.4
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
html-pipeline v3 reorganizes the namespace (HTML::Pipeline -> HTMLPipeline),
splits the single Filter base class into TextFilter/ConvertFilter/NodeFilter,
makes the pipeline accept filter instances (not classes) via explicit keyword
arguments, and returns a result hash from #call. Update the test harness's
sample pipeline to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
html-pipeline v3 replaces the v1 SanitizationFilter (Sanitize gem) with one
backed by Selma. The default allowlist and serialization differ in observable
but reasonable ways:

* Heading/anchor IDs (e.g. <h2 id="first-section">) are now preserved, fixing
  TOC anchor links that v1 stripped silently.
* <span id=...>, <div id=...>, and <caption> elements are preserved.
* Bare-filename relative hrefs (<a href="rawr.html">) are dropped because
  Selma's :relative protocol matcher requires a leading ./, ../, or /. Absolute
  http(s) and root-relative links are unaffected.
* Self-closing tags serialize as <br/> instead of <br>.
* Non-ASCII glyphs in attribute-free text are emitted as numeric entities
  (\u274F -> &#10063;).

These fixtures document representative pipeline output, not contracts the
library itself enforces - real consumers build their own pipelines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
@zkoppert zkoppert force-pushed the dependabot/bundler/html-pipeline-3.2.4 branch from afe769c to e7beefb Compare June 8, 2026 23:22
GitHub Advanced Security started work on behalf of zkoppert June 8, 2026 23:22 View session
GitHub Advanced Security finished work on behalf of zkoppert June 8, 2026 23:23
@zkoppert zkoppert requested a review from Copilot June 9, 2026 00:59
@zkoppert zkoppert self-assigned this Jun 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades the development dependency on html-pipeline to the 3.2 series and updates the repo’s test harness + expected fixture outputs to the new HTMLPipeline API and Selma-based sanitization behavior, keeping the dependency bump verifiable via bundle exec rake test.

Changes:

  • Bump html-pipeline from ~> 1.0 to ~> 3.2 (and update Gemfile.lock accordingly, including selma/zeitwerk).
  • Migrate test/markup_test.rb from HTML::Pipeline to the v3 HTMLPipeline instance API (Pipeline.call(... )[:output]).
  • Regenerate rendered HTML fixtures in test/markups/ to match Selma’s sanitization + serialization output (including known relative-link href stripping behavior).
Show a summary per file
File Description
github-markup.gemspec Updates the html-pipeline development dependency requirement to ~> 3.2.
Gemfile.lock Locks the new html-pipeline version and its new dependencies (selma, zeitwerk).
test/markup_test.rb Ports the test harness to HTMLPipeline v3 API and output handling.
test/markups/README.asciidoc.html Updates expected sanitized/rendered output for AsciiDoc fixture under Selma.
test/markups/README.creole.html Updates expected sanitized/rendered output for Creole fixture under Selma.
test/markups/README.directives.rst.html Updates expected sanitized/rendered output for directives RST fixture under Selma.
test/markups/README.litcoffee.html Updates expected sanitized/rendered output for Literate CoffeeScript fixture under Selma.
test/markups/README.long.rst.html Updates expected sanitized/rendered output for long RST fixture under Selma.
test/markups/README.mediawiki.html Updates expected sanitized/rendered output for MediaWiki fixture under Selma.
test/markups/README.org.html Updates expected sanitized/rendered output for Org fixture under Selma.
test/markups/README.pod.html Updates expected sanitized/rendered output for POD fixture under Selma.
test/markups/README.rdoc.html Updates expected sanitized/rendered output for RDoc fixture under Selma.
test/markups/README.rst.html Updates expected sanitized/rendered output for RST fixture under Selma.
test/markups/README.rst.txt.html Updates expected sanitized/rendered output for RST text fixture under Selma.
test/markups/README.toc.asciidoc.html Updates expected TOC/id output for AsciiDoc TOC fixture under Selma.
test/markups/README.toc.rst.html Updates expected TOC/id output for RST TOC fixture under Selma.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 15/16 changed files
  • Comments generated: 1

Comment thread github-markup.gemspec Outdated
html-pipeline v3 uses Selma directly instead of the sanitize gem, and
nothing in this repo requires sanitize. The 'sanitize' method calls in
lib/github/markup/command_implementation.rb are an internal encoding
helper, not the gem.

Caught by Copilot's code review on #2061.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
GitHub Advanced Security started work on behalf of zkoppert June 9, 2026 03:02 View session
GitHub Advanced Security finished work on behalf of zkoppert June 9, 2026 03:03
@zkoppert zkoppert requested a review from Copilot June 9, 2026 03:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 15/16 changed files
  • Comments generated: 0 new

@zkoppert zkoppert merged commit 095cb2d into master Jun 9, 2026
12 checks passed
@zkoppert zkoppert deleted the dependabot/bundler/html-pipeline-3.2.4 branch June 9, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants