Skip to content

json repsonse contains html markup #260

@dispanser

Description

@dispanser

Using hoogle 5, the json response contains html markup and escape sequences (&gt).

E.g., when querying https://hoogle.haskell.org/?mode=json&hoogle=fmap&count=1, formatted json response is:

[
  {
    "url": "https://hackage.haskell.org/package/base/docs/Prelude.html#v:fmap",
    "module": {
      "url": "https://hackage.haskell.org/package/base/docs/Prelude.html",
      "name": "Prelude"
    },
    "package": {
      "url": "https://hackage.haskell.org/package/base",
      "name": "base"
    },
    "item": "<span class=name><0>fmap</0></span> :: Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b",
    "type": "",
    "docs": ""
  }
]

I think that the default behavior shouldn't contain any markup, as it's supposed to be consumed by a machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions