Skip to content

VSB-TUO/Fix dspace-customers 1083 R68: sanitize RefBox citation HTML - #1706

Merged
milanmajchrak merged 1 commit into
customer/vsb-tuofrom
vsb-tuo/fe-refbox-sanitize-citation
Nov 3, 2026
Merged

milanmajchrak merged 1 commit into
customer/vsb-tuofrom
vsb-tuo/fe-refbox-sanitize-citation

Conversation

@milanmajchrak

Copy link
Copy Markdown
Collaborator

References

Port of dtq-dev PR 1662 (commit a5298dd). dspace-customers issue 1083, finding R68. BE part: VŠB DSpace PR 1633 (port of DSpace PR 1534).

Description

The RefBox citation is no longer rendered with bypassSecurityTrustHtml, so Angular's sanitizer strips scripts and event handlers and makes javascript: links inert. The <i> and <a> formatting stays.

Instructions for Reviewers

  • clarin-ref-citation.component.ts passes the server text to [innerHTML] as a plain string. DomSanitizer is no longer injected.
  • New clarin-ref-citation.component.spec.ts: no <script>, no onerror, and the javascript: link is inert. The italic title and the handle link still render.
  • Deploy together with VŠB DSpace PR 1633, which escapes the same text on the server.
  • The diff is the same as dtq-dev PR 1662. The cherry-pick had no conflicts.
  • Tests: clarin-ref-citation.component.spec.ts.

Checklist

  • My PR is created against the branch it ports to
  • My PR is small in size
  • My PR follows the code conventions and passes ESLint
  • My PR passes all specs and includes new or updated specs
  • My PR includes details on how to test it
  • No new dependencies, no new configuration

🤖 Generated with Claude Code

Port of dtq-dev PR 1662 (commit a5298dd).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milanmajchrak
milanmajchrak merged commit cfd95ce into customer/vsb-tuo Nov 3, 2026
5 checks passed
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.

1 participant