Skip to content

Conversation

@y-yagi
Copy link
Contributor

@y-yagi y-yagi commented Sep 16, 2025

Currently, the header on Security Events page shows HTML as is.

rubygems org_gems_watchcat_security_events

This is because Kaminari helpers methods return HTML, but showing those with plain.
https://github.com/kaminari/kaminari/blob/ca4a5dcfce40ede7990ebfe00a12f21e78e910d9/kaminari-core/config/locales/kaminari.yml#L21

This PR changes to use raw to show HTML correctly. paginate also had the same issue and fixed it too.

@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.49%. Comparing base (13bb7d2) to head (b908435).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5972      +/-   ##
==========================================
- Coverage   97.22%   94.49%   -2.74%     
==========================================
  Files         473      473              
  Lines        9764     9823      +59     
==========================================
- Hits         9493     9282     -211     
- Misses        271      541     +270     

☔ 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.

@simi
Copy link
Contributor

simi commented Sep 16, 2025

No chance to mark output as html_safe before? 🤔

@y-yagi
Copy link
Contributor Author

y-yagi commented Sep 16, 2025

It seems that using translacation helper with html_safe.

result.html_safe? ? result : result.to_s

raw t(".owner_added_authorizer_html", authorizer: link_to_user_from_gid(additional.actor_gid, authorizer))

But, it seems that Kaminari helpers have never used in view components(some view templates use those though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants