{"id":15168688,"url":"https://github.com/matschik/deno_html_entities","last_synced_at":"2026-01-22T20:09:00.324Z","repository":{"id":62421504,"uuid":"253272139","full_name":"matschik/deno_html_entities","owner":"matschik","description":"Fast html entities decode \u0026 encode library for Deno.","archived":false,"fork":false,"pushed_at":"2020-04-05T20:19:46.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-06T12:13:15.426Z","etag":null,"topics":["deno","encoder-decoder","html"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matschik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-05T15:51:47.000Z","updated_at":"2024-01-02T22:22:16.000Z","dependencies_parsed_at":"2022-11-01T17:45:32.130Z","dependency_job_id":null,"html_url":"https://github.com/matschik/deno_html_entities","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/matschik/deno_html_entities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matschik%2Fdeno_html_entities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matschik%2Fdeno_html_entities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matschik%2Fdeno_html_entities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matschik%2Fdeno_html_entities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matschik","download_url":"https://codeload.github.com/matschik/deno_html_entities/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matschik%2Fdeno_html_entities/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"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":["deno","encoder-decoder","html"],"created_at":"2024-09-27T06:40:27.100Z","updated_at":"2026-01-22T20:09:00.301Z","avatar_url":"https://github.com/matschik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deno_html_entities\n\n\u003e Fast html entities decode \u0026 encode library for Deno.\n\nThis library is [mdevils/node-html-entities](https://github.com/mdevils/node-html-entities) with ES Modules syntax.\n\n## Usage\nSupports 4 methods for each module (Html5Entities, XmlEntities, Html4Entities):\n\n* encode — encodes, replacing characters to its entity representations. Ignores UTF characters with no entity representation.\n* encodeNonUTF — encodes, replacing characters to its entity representations. Inserts numeric entities for UTF characters.\n* encodeNonASCII — encodes, replacing only non-ASCII characters to its numeric entity representations.\n* decode — decodes, replacing entities to characters. Unknown entities are left as is.\n\n**All HTML entities encoding/decoding**\n\n```javascript\nimport { Html5Entities } from \"https://deno.land/x/html_entities@v1.0/mod.js\";\n\nHtml5Entities.encode('\u003c\u003e\"\u0026©®∆'); // \u0026lt;\u0026gt;\u0026quot;\u0026amp;\u0026copy;\u0026reg;∆\nHtml5Entities.encodeNonUTF('\u003c\u003e\"\u0026©®∆'); // \u0026lt;\u0026gt;\u0026quot;\u0026amp;\u0026copy;\u0026reg;\u0026#8710;\nHtml5Entities.encodeNonASCII('\u003c\u003e\"\u0026©®∆'); // \u003c\u003e\"\u0026©®\u0026#8710;\nHtml5Entities.decode('\u0026lt;\u0026gt;\u0026quot;\u0026amp;\u0026copy;\u0026reg;'); // \u003c\u003e\"\u0026©®\n```\n\n**XML entities**\n\nHTML validity and XSS attack prevention you can achieve from XmlEntities module.\n\n```js\nimport { XmlEntities } from \"https://deno.land/x/html_entities@v1.0/mod.js\";\n\nXmlEntities.encode('\u003c\u003e\"\\'\u0026©®'); // \u0026lt;\u0026gt;\u0026quot;\u0026apos;\u0026amp;©®\nXmlEntities.encodeNonUTF('\u003c\u003e\"\\'\u0026©®'); // \u0026lt;\u0026gt;\u0026quot;\u0026apos;\u0026amp;\u0026#169;\u0026#174;\nXmlEntities.encodeNonASCII('\u003c\u003e\"\\'\u0026©®'); // \u003c\u003e\"\\'\u0026©®\nXmlEntities.decode('\u0026lt;\u0026gt;\u0026quot;\u0026apos;\u0026amp;\u0026copy;\u0026reg;\u0026#8710;'); // \u003c\u003e\"'\u0026\u0026copy;\u0026reg;∆\n```\n\n## Tests\n```sh\n$ deno test mod_test.js\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatschik%2Fdeno_html_entities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatschik%2Fdeno_html_entities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatschik%2Fdeno_html_entities/lists"}