{"id":16589491,"url":"https://github.com/rnons/purescript-html-parser-halogen","last_synced_at":"2026-03-10T15:01:50.092Z","repository":{"id":40425265,"uuid":"129022946","full_name":"rnons/purescript-html-parser-halogen","owner":"rnons","description":"A library to render HTML string into Halogen views","archived":false,"fork":false,"pushed_at":"2022-08-16T20:25:55.000Z","size":323,"stargazers_count":22,"open_issues_count":2,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-07T05:17:37.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rnons.github.io/purescript-html-parser-halogen/","language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rnons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-11T02:33:41.000Z","updated_at":"2023-07-25T14:16:20.000Z","dependencies_parsed_at":"2022-08-09T20:10:17.558Z","dependency_job_id":null,"html_url":"https://github.com/rnons/purescript-html-parser-halogen","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rnons/purescript-html-parser-halogen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fpurescript-html-parser-halogen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fpurescript-html-parser-halogen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fpurescript-html-parser-halogen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fpurescript-html-parser-halogen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnons","download_url":"https://codeload.github.com/rnons/purescript-html-parser-halogen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fpurescript-html-parser-halogen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30338570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T14:50:13.961Z","status":"ssl_error","status_checked_at":"2026-03-10T14:49:32.490Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T23:09:01.024Z","updated_at":"2026-03-10T15:01:48.042Z","avatar_url":"https://github.com/rnons.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# purescript-html-parser-halogen\n\n[![purescript-html-parser-halogen on Pursuit](https://pursuit.purescript.org/packages/purescript-html-parser-halogen/badge)](https://pursuit.purescript.org/packages/purescript-html-parser-halogen)\n\nA library to render raw HTML string into Halogen views. You might also be interested in [purescript-markdown-it-halogen](https://github.com/nonbili/purescript-markdown-it-halogen), a library to render Markdown into Halogen views.\n\n[Playground](https://rnons.github.io/purescript-html-parser-halogen/)\n\n## How to use\n\n```purescript\nimport Html.Renderer.Halogen as RH\n\nrawHtml :: String\nrawHtml = \"\"\"\u003ca href=\"https://github.com\"\u003ea link\u003c/a\u003e\"\"\"\n\nrender =\n  ...\n  HH.div_ [ RH.render_ rawHtml ]\n```\n\nIt's as simple as this, in most cases you only need the `render` function from `Html.Renderer.Halogen` module.\n\n## Be cautious\n\nThis library doesn't support malformed HTML, and is prone to XSS attack. Use it only when you trust the HTML string.\n\nYou can balance and sanitize the HTML on the backend, e.g. `sanitizeBalance` from [xss-sanitize](http://hackage.haskell.org/package/xss-sanitize/docs/Text-HTML-SanitizeXSS.html#v:sanitizeBalance).\n\n## How it works\n\n`Html.Parser` parses HTML `String` as `HtmlNode`. `Html.Renderer.Halogen` converts `HtmlNode` to halogen `HTML`. You can also write adapters to convert `HtmlNode` to the `HTML` type of other view libraries.\n\nIf you want to `Html.Parser` with other view libraries, I can release it as a separate package, let me know if you are interested.\n\n## Other approaches to render raw HTML into halogen views\n\n- https://github.com/slamdata/purescript-halogen/issues/324\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnons%2Fpurescript-html-parser-halogen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnons%2Fpurescript-html-parser-halogen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnons%2Fpurescript-html-parser-halogen/lists"}