Skip to content

feat: allow saving and rendering of HTML with relative path images#8177

Merged
ruibaby merged 5 commits intohalo-dev:mainfrom
LIlGG:feat/support-comment-media
Mar 5, 2026
Merged

feat: allow saving and rendering of HTML with relative path images#8177
ruibaby merged 5 commits intohalo-dev:mainfrom
LIlGG:feat/support-comment-media

Conversation

@LIlGG
Copy link
Copy Markdown
Member

@LIlGG LIlGG commented Jan 5, 2026

What type of PR is this?

/kind feature

What this PR does / why we need it:

在渲染评论 HTML 及保存 HTML 内容时允许包含相对路径的图片。

这是评论支持上传媒体文件的相关 PR。

see halo-dev/plugin-comment-widget#205

Does this PR introduce a user-facing change?

None

Preserves relative links in comment service and allows 'img' tags and 'class' attribute on 'code' tags in comment content rendering. Improves flexibility for displaying user-generated content with syntax highlighting and images.
@f2c-ci-robot f2c-ci-robot Bot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. labels Jan 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.07%. Comparing base (42c374d) to head (1f194de).
⚠️ Report is 471 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8177      +/-   ##
============================================
+ Coverage     59.55%   61.07%   +1.51%     
- Complexity     3812     3991     +179     
============================================
  Files           677      695      +18     
  Lines         23248    23766     +518     
  Branches       1500     1550      +50     
============================================
+ Hits          13846    14514     +668     
+ Misses         8764     8512     -252     
- Partials        638      740     +102     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

LIlGG added 4 commits January 6, 2026 15:54
Updated CommentContentConverter tests to mock and verify ExternalLinkProcessor instead of ExternalUrlSupplier. This aligns the tests with recent changes in link processing logic and ensures correct handling of relative and absolute image links.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 7, 2026

@ruibaby ruibaby added this to the 2.23.x milestone Jan 21, 2026
Copy link
Copy Markdown
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2026
@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Mar 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2026
@ruibaby ruibaby merged commit 891ebed into halo-dev:main Mar 5, 2026
10 checks passed
@ruibaby ruibaby modified the milestones: 2.23.x, 2.23.0 Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants