{"id":32956246,"url":"https://github.com/ecosia/vue-safe-html","last_synced_at":"2026-01-17T02:09:19.087Z","repository":{"id":37533063,"uuid":"328958972","full_name":"ecosia/vue-safe-html","owner":"ecosia","description":"A Vue directive which renders sanitised HTML dynamically","archived":false,"fork":false,"pushed_at":"2025-12-03T17:59:41.000Z","size":448,"stargazers_count":32,"open_issues_count":8,"forks_count":5,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-12-06T22:53:11.736Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ecosia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-12T11:01:56.000Z","updated_at":"2025-06-29T23:07:50.000Z","dependencies_parsed_at":"2023-11-06T14:31:01.955Z","dependency_job_id":"da3db80a-903d-4d01-bc8f-0706fa768b94","html_url":"https://github.com/ecosia/vue-safe-html","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ecosia/vue-safe-html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecosia%2Fvue-safe-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecosia%2Fvue-safe-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecosia%2Fvue-safe-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecosia%2Fvue-safe-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecosia","download_url":"https://codeload.github.com/ecosia/vue-safe-html/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecosia%2Fvue-safe-html/sbom","scorecard":{"id":365767,"data":{"date":"2025-08-11","repo":{"name":"github.com/ecosia/vue-safe-html","commit":"08011842b9a1611ceab15abd4ffda4c75b77a0ed"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":8,"reason":"Found 8/10 approved changesets -- score normalized to 8","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":"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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.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":"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":"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/main.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/ecosia/vue-safe-html/main.yml/main?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction 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":"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":"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-5j4c-8p2g-v4jx","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T11:48:30.384Z","repository_id":37533063,"created_at":"2025-08-18T11:48:30.384Z","updated_at":"2025-08-18T11:48:30.384Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28492047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"online","status_checked_at":"2026-01-17T02:00:07.808Z","response_time":85,"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-11-12T23:00:19.023Z","updated_at":"2026-01-17T02:09:19.080Z","avatar_url":"https://github.com/ecosia.png","language":"JavaScript","funding_links":[],"categories":["Utilities [🔝](#readme)","Components \u0026 Libraries"],"sub_categories":["Utilities"],"readme":"# vue-safe-html\n\n![Node](https://img.shields.io/node/v/vue-safe-html)\n[![NPM](https://img.shields.io/npm/v/vue-safe-html)](https://www.npmjs.com/package/vue-safe-html)\n[![Github Checks Status](https://img.shields.io/github/workflow/status/ecosia/vue-safe-html/CI)](https://github.com/ecosia/vue-safe-html/tree/main)\n[![Vue.js](https://img.shields.io/badge/vue-2-green.svg)](https://vuejs.org)\n[![Vue.js](https://img.shields.io/badge/vue-3-green.svg)](https://v3.vuejs.org)\n\nA Vue directive which renders sanitised HTML dynamically. Zero dependencies, compatible with Vue versions 3 and 2, TypeScript-ready.\n\n**Note:** This library is not XSS-safe, but only strips tags programmatically.\n\n## Installation\n\nInstall package:\n\n```sh\nnpm install vue-safe-html\n# OR\nyarn add vue-safe-html\n```\n\nUse the plugin:\n\n```js\nimport Vue from 'vue';\nimport VueSafeHTML from 'vue-safe-html';\n\nVue.use(VueSafeHTML);\n```\n\n## Usage\n\nIn your component:\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv v-safe-html=\"myUnsafeHTML\"\u003e\n\u003c/template\u003e\n```\n\n```js\nexport default {\n  computed: {\n    myUnsafeHTML() {\n      return '\u003cscript\u003eoh my!\u003c/script\u003e I am safe!';\n    }\n  }\n}\n```\n\nRenders to:\n\n```html\n\u003cdiv\u003eI am safe!\u003c/div\u003e\n```\n\n### Options\n\n#### allowedTags\n\nArray of strings. Default: `['a', 'b', 'br', 'strong', 'i', 'em', 'mark', 'small', 'del', 'ins', 'sub', 'sup']`.\n\nCustomize the tags that are allowed to be rendered, either by providing new ones:\n\n```js\nVue.use(VueSafeHTML, {\n  allowedTags: ['marquee', 'blockquote'],\n});\n```\n\nOr extending the default ones:\n\n```js\nimport VueSafeHTML, { allowedTags } from 'vue-safe-html';\n\nVue.use(VueSafeHTML, {\n  allowedTags: [...allowedTags, 'marquee', 'blockquote'],\n});\n```\n\nIf no tags are passed, all tags are stripped:\n\n```js\nimport VueSafeHTML from 'vue-safe-html';\n\nVue.use(VueSafeHTML, {\n  allowedTags: [],\n});\n```\n\nIt is also possible to provide custom allowed tags directly to the directive tag, using directive modifiers. This allows local override of the option:\n\n```html\n\u003ctemplate\u003e\n  \u003c!-- only allow p and strong tags --\u003e\n  \u003cdiv v-safe-html.p.strong=\"myUnsafeHTML\"\u003e\n\u003c/template\u003e\n```\n\n#### allowedAttributes\n\nArray of strings. Default: []\n\nCustomize the tag attributes that are allowed to be rendered:\n\n```js\nVue.use(VueSafeHTML, {\n  allowedTags: ['a'],\n  allowedAttributes: ['title', 'class', 'href'],\n});\n```\n\n### Nuxt\n\n`vue-safe-html` is written as a Vue plugin so you can easily use it inside Nuxt by following [the Nuxt documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins#vue-plugins).\n\n## License\n\n[Do No Harm](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecosia%2Fvue-safe-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecosia%2Fvue-safe-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecosia%2Fvue-safe-html/lists"}