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

Strip HTML out of python decision point values when rendering decision points to json #483

Open
ahouseholder opened this issue Feb 20, 2024 · 0 comments

Comments

@ahouseholder
Copy link
Contributor

ahouseholder commented Feb 20, 2024

This issue could be made redunant by a solution to

Otherwise, at present, we have HTML content in the description of the Safety decision point following the merge of #479. The end result, as described in that PR

is that the JSON file emitted contains that HTML markup, and it really should not.

One approach would be to add a wrapper method on the SsvcDecisionPointValue class in src/ssvc/decision_points/base.py to strip out HTML from the description field when calling the to_json method provided by the dataclass_json decorator.

Another approach could be to override the encoder for _Base.description in src/ssvc/_mixins.py. See for example https://pypi.org/project/dataclasses-json/#Overriding

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

No branches or pull requests

1 participant