Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Narrative HTML validation ignores some errors #3100

Open
michael-wilson-au opened this issue Feb 2, 2023 · 2 comments
Open

Narrative HTML validation ignores some errors #3100

michael-wilson-au opened this issue Feb 2, 2023 · 2 comments
Labels
Bug Bug bug bug. Specification An issue referring or related to the FHIR Specification

Comments

@michael-wilson-au
Copy link

michael-wilson-au commented Feb 2, 2023

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:

  1. 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"
      ]
    }
  ]
}
  1. Create the resource POST {{fhirurl}}/Patient
    

Expected behavior
400 Bad Request response for "Illegal element name 'NOT_VALID_TAG'."

Actual behavior
201 Created response

AB#101209

@EXPEkesheth
Copy link
Collaborator

Thanks for reporting the issue, we will take a look and respond

@michael-wilson-au
Copy link
Author

I have submitted PR #3101 to resolve this issue

@EXPEkesheth EXPEkesheth added the Review Tag for PM/Dev Review label Mar 2, 2023
@EXPEkesheth EXPEkesheth added the Specification An issue referring or related to the FHIR Specification label Mar 13, 2023
@EXPEkesheth EXPEkesheth removed the Review Tag for PM/Dev Review label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug bug bug. Specification An issue referring or related to the FHIR Specification
Projects
None yet
Development

No branches or pull requests

2 participants