Update narrative sanitizer for potentially dangerous content#5468
Closed
Update narrative sanitizer for potentially dangerous content#5468
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5468 +/- ##
=======================================
Coverage ? 76.90%
=======================================
Files ? 976
Lines ? 35614
Branches ? 5355
=======================================
Hits ? 27388
Misses ? 6894
Partials ? 1332 🚀 New features to boost your workflow:
|
apurvabhaleMS
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improves checking the FHIR resource narrative for potentially dangerous content.
The following types of links inside an href property will be considered 'active' content, and not allowed:
"javascript:",
"vbscript:",
"data:",
"livescript:",
"file:",
"blob:",
"ftp:",
"ms-its:",
"mhtml:",
"jar:",
Any FHIR resource with these as part of an href property in the narrative will not pass validation and be rejected by the service.
Related issues
Addresses [issue AB#186387].
Testing
Additional unit tests were added. Manually tried US Core 6.1.0 to ensure no regression in loading the IG.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)