Describe the bug
The HTML validation of a resource narrative can ignore errors that should be raised.
If the narrative contains html errors that should be ignored the validation function exits without completing the rest of the validation which may find additional errors that shouldn't be ignored.
FHIR Version?
Core
Data provider?
N/A
To Reproduce
Steps to reproduce the behavior:
Create a FHIR resource (i.e. Patient) with a text narrative containing html errors that can be ignored by the narrative html validator as well as html errors that cannot be ignored:
{
"resourceType": "Patient",
"id": "example",
"text": {
"status": "generated",
"div": "<div><!-- Comment ended with a dash. This error should be ignored --->\"><not_valid_tag>This tag should return validation error</not_valid_tag></div>"
},
"name": [
{
"family": "Windsor",
"given": [
"Peter",
"James"
]
}
]
}
Create the resource POST {{fhirurl}}/Patient
Expected behavior
400 Bad Request response for "Illegal element name 'NOT_VALID_TAG'."
Describe the bug The HTML validation of a resource narrative can ignore errors that should be raised.
If the narrative contains html errors that should be ignored the validation function exits without completing the rest of the validation which may find additional errors that shouldn't be ignored.
FHIR Version? Core
Data provider? N/A
To Reproduce Steps to reproduce the behavior:
Expected behavior 400 Bad Request response for "Illegal element name 'NOT_VALID_TAG'."
Actual behavior 201 Created response
AB#101209