{"id":15288832,"url":"https://github.com/hopsoft/active_storage_svg_sanitizer","last_synced_at":"2025-07-12T17:37:08.977Z","repository":{"id":35106347,"uuid":"207375425","full_name":"hopsoft/active_storage_svg_sanitizer","owner":"hopsoft","description":"Sanitize ActiveStorage SVG uploads","archived":false,"fork":false,"pushed_at":"2023-01-20T07:54:46.000Z","size":62,"stargazers_count":21,"open_issues_count":11,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-16T09:49:26.468Z","etag":null,"topics":["active-storage","activestorage","rails","ruby-on-rails","security","svg"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/hopsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-09T18:19:07.000Z","updated_at":"2024-06-19T15:55:29.000Z","dependencies_parsed_at":"2023-02-12T00:30:40.410Z","dependency_job_id":null,"html_url":"https://github.com/hopsoft/active_storage_svg_sanitizer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hopsoft/active_storage_svg_sanitizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Factive_storage_svg_sanitizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Factive_storage_svg_sanitizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Factive_storage_svg_sanitizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Factive_storage_svg_sanitizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hopsoft","download_url":"https://codeload.github.com/hopsoft/active_storage_svg_sanitizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hopsoft%2Factive_storage_svg_sanitizer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260453842,"owners_count":23011586,"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":["active-storage","activestorage","rails","ruby-on-rails","security","svg"],"created_at":"2024-09-30T15:53:20.339Z","updated_at":"2025-07-12T17:37:08.954Z","avatar_url":"https://github.com/hopsoft.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# ActiveStorageSvgSanitizer\n\nA small library that sanitizes ActiveStorage SVG uploads by stripping any embedded `script` tags.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'active_storage_svg_sanitizer'\n```\n\n## Usage\n\nSimply including this gem will ensure your svg uploads are sanitized.\n\n_This libary uses ActiveJob to perform sanization tasks in the background._\n\n\n### Rendering SVG Images\n\nIf you'd like to render ActiveSorage svg images in your application, add an initializer that unregisters `svg` as a binary file type.\n\n```ruby\n# config/initializers/active_storage.rb\nActiveStorage::Engine.config.active_storage.content_types_to_serve_as_binary.delete \"image/svg+xml\"\n```\n\n## License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopsoft%2Factive_storage_svg_sanitizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhopsoft%2Factive_storage_svg_sanitizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopsoft%2Factive_storage_svg_sanitizer/lists"}