Skip to content

Don't HTML-sanitize JSON output #135

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

Merged
merged 1 commit into from
Dec 27, 2020
Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Dec 23, 2020

By default, the json package HTML-sanitizes strings during marshalling. This is not useful for this application and resulted in the JSON output containing gibberish.


Before:

"rules": [
  {
    "category": "library.properties",
    "subcategory": "author field",
    "ID": "LP024",
    "brief": "author \u003c min length",
    "description": "",
    "result": "fail",
    "level": "error",
    "message": "library.properties author value is less than minimum length."
  },

After:

"rules": [
  {
    "category": "library.properties",
    "subcategory": "author field",
    "ID": "LP024",
    "brief": "author < min length",
    "description": "",
    "result": "fail",
    "level": "error",
    "message": "library.properties author value is less than minimum length."
  }

By default, the `json` package HTML-sanitizes strings during marshalling. This is not useful for this application and
resulted in the JSON output containing gibberish.
@per1234 per1234 requested a review from ubidefeo December 23, 2020 07:43
Copy link
Contributor

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good!
👍🏼

@per1234 per1234 merged commit 31c043d into main Dec 27, 2020
@per1234 per1234 deleted the per1234/remove-report-html-encoding branch December 27, 2020 12:52
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 29, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants