{"id":35012694,"url":"https://github.com/fefit/htmlentity","last_synced_at":"2025-12-27T05:03:50.743Z","repository":{"id":62440273,"uuid":"313954754","full_name":"fefit/htmlentity","owner":"fefit","description":"A library for encoding and decoding html entities.","archived":false,"fork":false,"pushed_at":"2024-06-07T07:17:40.000Z","size":223,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T02:51:21.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fefit.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":"2020-11-18T14:10:33.000Z","updated_at":"2024-06-07T07:17:43.000Z","dependencies_parsed_at":"2022-11-01T21:53:19.878Z","dependency_job_id":null,"html_url":"https://github.com/fefit/htmlentity","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fefit/htmlentity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefit%2Fhtmlentity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefit%2Fhtmlentity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefit%2Fhtmlentity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefit%2Fhtmlentity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fefit","download_url":"https://codeload.github.com/fefit/htmlentity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fefit%2Fhtmlentity/sbom","scorecard":{"id":395710,"data":{"date":"2025-08-11","repo":{"name":"github.com/fefit/htmlentity","commit":"24a4ed511124abb17ffe698a1a8d9b036d580c48"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/fefit/htmlentity/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fefit/htmlentity/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/fefit/htmlentity/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/fefit/htmlentity/test.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/test.yml:47","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T18:57:12.392Z","repository_id":62440273,"created_at":"2025-08-18T18:57:12.392Z","updated_at":"2025-08-18T18:57:12.392Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28072686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-12-27T05:02:12.908Z","updated_at":"2025-12-27T05:03:50.732Z","avatar_url":"https://github.com/fefit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# htmlentity\n\nA library for encoding and decoding HTML entities.\n\n[![Docs](https://docs.rs/htmlentity/badge.svg)](https://docs.rs/htmlentity)\n[![Build Status](https://github.com/fefit/htmlentity/actions/workflows/test.yml/badge.svg)](https://github.com/fefit/htmlentity/actions)\n[![codecov](https://codecov.io/gh/fefit/htmlentity/branch/main/graph/badge.svg)](https://codecov.io/gh/fefit/htmlentity)\n\n## How to use\n\n```rust\nuse htmlentity::entity::{ encode, decode, EncodeType, CharacterSet, ICodedDataTrait };\nuse htmlentity::types::{ AnyhowResult, Byte };\nfn main() -\u003e AnyhowResult\u003c()\u003e {\n  let html = \"\u003cdiv name='htmlentity'\u003eHello!世界!\u003c/div\u003e\";\n  let html_after_encoded = \"\u0026lt;div name='htmlentity'\u0026gt;Hello!\u0026#x4e16;\u0026#x754c;!\u0026lt;/div\u0026gt;\";\n  // encode\n  let encoded_data = encode(\n    html.as_bytes(), \n    // encode format\n    \u0026EncodeType::NamedOrHex,\n    // charcters need to be encoded \n    \u0026CharacterSet::HtmlAndNonASCII\n  );\n  assert_eq!(encoded_data.to_bytes(), html_after_encoded.as_bytes());\n  assert_eq!(encoded_data.to_string()?, String::from(html_after_encoded));\n  let char_list = String::from(html_after_encoded).chars().collect::\u003cVec\u003cchar\u003e\u003e();\n  assert_eq!(encoded_data.to_chars()?, char_list);\n  // decode\n  let bytes = encoded_data.into_iter().map(|(byte, _)| *byte).collect::\u003cVec\u003cByte\u003e\u003e();\n  let decoded_data = decode(\u0026bytes);\n  assert_eq!(decoded_data.to_bytes(), html.as_bytes());\n  assert_eq!(decoded_data.to_string()?, String::from(html));\n  let char_list = String::from(html).chars().collect::\u003cVec\u003cchar\u003e\u003e();\n  assert_eq!(decoded_data.to_chars()?, char_list);\n  // shortcut usage\n  assert_eq!(\n    encode(\n      html.as_bytes(), \n      \u0026EncodeType::NamedOrHex,\n      \u0026CharacterSet::HtmlAndNonASCII,\n    ).to_string()?,\n    String::from(html)\n  );\n  Ok(())\n}\n```\n\nFor more details, please see the document in [Docs.rs](https://docs.rs/htmlentity)\n\n## License\n\n[MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffefit%2Fhtmlentity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffefit%2Fhtmlentity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffefit%2Fhtmlentity/lists"}