{"id":28387593,"url":"https://github.com/idemio/tiny-clean","last_synced_at":"2025-06-26T20:31:57.068Z","repository":{"id":292985985,"uuid":"982565509","full_name":"idemio/tiny-clean","owner":"idemio","description":"light-weight high-performance sanitizers for common use cases","archived":false,"fork":false,"pushed_at":"2025-05-17T22:34:43.000Z","size":127,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-31T00:52:01.910Z","etag":null,"topics":["cleaning-data","owasp","sanitation","sanitizer","string-manipulation"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idemio.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-13T04:49:16.000Z","updated_at":"2025-05-17T22:34:46.000Z","dependencies_parsed_at":"2025-05-13T06:32:03.180Z","dependency_job_id":null,"html_url":"https://github.com/idemio/tiny-clean","commit_stats":null,"previous_names":["idemio/tiny-clean"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/idemio/tiny-clean","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idemio%2Ftiny-clean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idemio%2Ftiny-clean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idemio%2Ftiny-clean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idemio%2Ftiny-clean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idemio","download_url":"https://codeload.github.com/idemio/tiny-clean/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idemio%2Ftiny-clean/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262139617,"owners_count":23265189,"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","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":["cleaning-data","owasp","sanitation","sanitizer","string-manipulation"],"created_at":"2025-05-30T18:38:04.251Z","updated_at":"2025-06-26T20:31:57.049Z","avatar_url":"https://github.com/idemio.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/idemio/tiny-clean/branch/main/graph/badge.svg)](https://codecov.io/gh/idemio/tiny-clean)\n[![CI Status](https://github.com/idemio/tiny-clean/workflows/Rust/badge.svg)](https://github.com/idemio/tiny-clean/actions)\n# Tiny Clean\nA light-weight high-performance string sanitizer to prevent XSS in different situations. \n\n## Features\n- Java Script Encoder\n- Xml Encoder\n- Uri Encoder \n\n## Usage\n```Rust\n    use tiny_clean::encoder::{Encoder, ValidAsciiRange};\n    use tiny_clean::java_script_encoder::{\n        JavaScriptEncoder, JavaScriptEncoderMode,\n    };\n    \n    let my_unsafe_data = r#\"...\"#\n    \n    // Javascript 'Block' Encoding\n    let encoder = JavaScriptEncoder::new(JavaScriptEncoderMode::Block, true);\n    \n    let my_clean_data = encoder.encode(\u0026my_unsafe_data);\n\n\n```\n\n## Performance\nThe following benchmarks were run on a machine with the following specs:\n- CPU: Intel Core i9-10850K @ 4.91GHz\n- Rust: 1.85.1\n\n### JavaScript Encoder\n| Encoder Settings          | Data Set   | Time Range (µs) |\n|---------------------------|------------|-----------------|\n| Block, ASCII Only         | Data Set 1 | 72.064 - 72.357 |\n| Block, ASCII Extended     | Data Set 1 | 72.348 - 72.696 |\n| Block, ASCII Only         | Data Set 2 | 241.73 - 243.53 |\n| Block, ASCII Extended     | Data Set 2 | 239.18 - 239.91 |\n| Source, ASCII Only        | Data Set 1 | 66.790 - 67.023 |\n| Source, ASCII Extended    | Data Set 1 | 67.016 - 67.246 |\n| Source, ASCII Only        | Data Set 2 | 217.54 - 218.34 |\n| Source, ASCII Extended    | Data Set 2 | 215.42 - 216.38 |\n| Html, ASCII Only          | Data Set 1 | 74.583 - 75.096 |\n| Html, ASCII Extended      | Data Set 1 | 74.237 - 74.447 |\n| Html, ASCII Only          | Data Set 2 | 242.57 - 244.40 |\n| Html, ASCII Extended      | Data Set 2 | 242.43 - 243.39 |\n| Attribute, ASCII Only     | Data Set 1 | 69.931 - 70.145 |\n| Attribute, ASCII Extended | Data Set 1 | 69.824 - 70.015 |\n| Attribute, ASCII Only     | Data Set 2 | 221.90 - 222.51 |\n| Attribute, ASCII Extended | Data Set 2 | 222.91 - 223.64 |\n\n### Uri Encoder\n\n| Encoder Settings | Data Set   | Time Range (µs) |\n|------------------|------------|-----------------|\n| FullUri          | Data Set 1 | 122.17 - 122.52 |\n| FullUri          | Data Set 2 | 362.05 - 365.21 |\n| Component        | Data Set 1 | 137.35 - 137.67 |\n| Component        | Data Set 2 | 372.54 - 374.13 |\n\n### Xml Encoder\n\n| Encoder Settings      | Data Set   | Time Range (µs) |\n|-----------------------|------------|-----------------|\n| Attribute             | Data Set 1 | 138.35 - 139.26 |\n| Attribute             | Data Set 2 | 298.04 - 299.57 |\n| All                   | Data Set 1 | 138.99 - 139.79 |\n| All                   | Data Set 2 | 300.50 - 301.73 |\n| Content               | Data Set 1 | 135.55 - 135.95 |\n| Content               | Data Set 2 | 295.20 - 296.15 |\n| SingleQuotedAttribute | Data Set 1 | 137.40 - 138.60 |\n| SingleQuotedAttribute | Data Set 2 | 293.27 - 294.44 |\n| DoubleQuotedAttribute | Data Set 1 | 137.19 - 137.76 |\n| DoubleQuotedAttribute | Data Set 2 | 296.32 - 297.35 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidemio%2Ftiny-clean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidemio%2Ftiny-clean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidemio%2Ftiny-clean/lists"}