Skip to content

SCIX-684 fix: strip HTML tags from title in browser tab and meta tags#765

Merged
thostetler merged 1 commit intoadsabs:masterfrom
thostetler:SCIX-684-fix-html-tags-in-title-nectar
Jan 14, 2026
Merged

SCIX-684 fix: strip HTML tags from title in browser tab and meta tags#765
thostetler merged 1 commit intoadsabs:masterfrom
thostetler:SCIX-684-fix-html-tags-in-title-nectar

Conversation

@thostetler
Copy link
Member

Article titles containing HTML markup (sub, sup, i, b, math, etc.) were
being rendered with raw tags in browser tabs and social sharing meta tags
instead of plain text.

  • Strip HTML from page title in AbsLayout using existing stripHtml utility
  • Strip HTML from og:title, twitter:title, citation_title, dc.title in Metatags
  • Preserve HTML in page body for MathJax rendering
  • Add test coverage for HTML stripping in meta tags

Article titles containing HTML markup (sub, sup, i, b, etc.) were being
rendered with raw tags in browser tabs and social sharing meta tags.

- Strip HTML from page title in AbsLayout using existing stripHtml utility
- Strip HTML from og:title, twitter:title, citation_title, dc.title
- Preserve HTML in page body for MathJax rendering
- Add test coverage for HTML stripping in meta tags
@thostetler thostetler requested a review from shinyichen January 12, 2026 06:00
@thostetler thostetler marked this pull request as ready for review January 12, 2026 06:00
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.8%. Comparing base (9678f94) to head (136af13).

Files with missing lines Patch % Lines
src/components/Metatags/Metatags.tsx 50.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #765     +/-   ##
========================================
- Coverage    71.8%   71.8%   -0.0%     
========================================
  Files         217     217             
  Lines       24485   24485             
  Branches     1402    1402             
========================================
- Hits        17575   17572      -3     
- Misses       6878    6881      +3     
  Partials       32      32             
Files with missing lines Coverage Δ
src/components/Metatags/Metatags.tsx 93.0% <50.0%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thostetler thostetler merged commit e0cbdba into adsabs:master Jan 14, 2026
5 checks passed
@thostetler thostetler deleted the SCIX-684-fix-html-tags-in-title-nectar branch January 14, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants