sanitize-html VS webmention.io

Compare sanitize-html vs webmention.io and see what are their differences.

sanitize-html

Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis. Built on htmlparser2 for speed and tolerance (by apostrophecms)

webmention.io

Easily enable webmentions and pingbacks on any web page (by aaronpk)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
sanitize-html webmention.io
4 15
3,613 740
2.0% -
7.4 6.6
about 1 month ago 6 months ago
JavaScript Ruby
MIT License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

sanitize-html

Posts with mentions or reviews of sanitize-html. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-19.

webmention.io

Posts with mentions or reviews of webmention.io. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-27.
  • Webmentions and the blogging void – part 1
    1 project | dev.to | 8 Jan 2023
    Webmentions (webmention.io) are a way to bring social activity and interactivity to your site without having it on your platform itself or needing to have complex systems in place. Harness the activity, audience, and functionality from existing platforms.
  • Add Mastodon replies to your blog
    4 projects | dev.to | 27 Dec 2022
    async function getMentions(url) { let mentions = []; let page = 0; let perPage = 100; while (true) { const results = await fetch( `https://webmention.io/api/mentions.jf2?target=${url}&per-page=${perPage}&page=${page}` ).then((r) => r.json()); mentions = mentions.concat(results.children); if (results.children.length < perPage) { break; } page++; } return mentions.sort((a, b) => ((a.published || a['wm-received']) < (b.published || b['wm-received']) ? -1 : 1)); }
  • Webmention.io
    1 project | /r/cryptogeum | 20 Dec 2022
    1 project | /r/patient_hackernews | 9 Mar 2021
  • How I set up a personal blog with Github, Cloudflare, and Webmentions
    3 projects | /r/u_aschatria777 | 16 Dec 2022
    Webmentions: https://webmention.io/
  • Blog comments on a static site via social networks
    3 projects | news.ycombinator.com | 12 Oct 2022
  • Webmentions yes, JavaScript no
    3 projects | dev.to | 23 May 2022
    In the interim, I found myself pondering why every webmentions-on-Hugo solution I’d ever found up to now used JavaScript, rather than trying to do it purely in Hugo. After all, Hugo sports plenty of data-grabbing horsepower. For example: in my own experience to date, I’ve found Hugo's getJSON feature just as useful as the node-fetch on which the aforementioned JS relied to grab data from webmention.io.
  • Building Permanent and Censorship-Resistant Blog with ETH Blockchain and IPFS
    5 projects | news.ycombinator.com | 29 Jun 2021
    One of the building blocks for such a system might be something like:

    https://webmention.io/

  • Show HN: I'm working on a open-source, self-host alternative to Disqus
    9 projects | news.ycombinator.com | 20 Apr 2021
  • Static Site Comments: A Jamstack How-To
    4 projects | dev.to | 24 Mar 2021
    { "type": "feed", "name": "Webmentions", "children": [ { "type": "entry", "author": { "type": "card", "name": "Jon Kuperman", "photo": "https://webmention.io/avatar/pbs.twimg.com/a52326c0080bba610767505756be327891f63722c0ceb6515de5840097c65cb9.jpg", "url": "https://twitter.com/jkup" }, "url": "https://twitter.com/jkup/status/1365400108016291841", "published": "2021-02-26T20:35:28+00:00", "wm-received": "2021-02-26T21:23:21Z", "wm-id": 1048723, "wm-source": "https://brid.gy/comment/twitter/raymondcamden/1365399913987792900/1365400108016291841", "wm-target": "https://webmentions.vercel.app/posts/alpha/", "content": { "html": "hello!\n\"u-mention\" href=\"https://twitter.com/raymondcamden\">\n\"u-mention\" href=\"https://webmentions.vercel.app/\">\n\"u-mention\" href=\"https://www.raymondcamden.com/\">", "text": "hello!" }, "in-reply-to": "https://webmentions.vercel.app/posts/alpha/", "wm-property": "in-reply-to", "wm-private": false }, { "type": "entry", "author": { "type": "card", "name": "Jonathan Bossenger", "photo": "https://webmention.io/avatar/pbs.twimg.com/211d2d7837e89b60b4399dfc76f5aa3aad8b2d792335f08ecd65ce6c73da48cb.jpg", "url": "https://twitter.com/jon_bossenger" }, "url": "https://twitter.com/jon_bossenger/status/1365402390212587527", "published": "2021-02-26T20:44:32+00:00", "wm-received": "2021-02-26T21:23:17Z", "wm-id": 1048721, "wm-source": "https://brid.gy/post/twitter/raymondcamden/1365402390212587527", "wm-target": "https://webmentions.vercel.app/posts/alpha/", "content": { "html": "I assume the copy of Edge runs on Ubuntu? \"https://webmentions.vercel.app/posts/alpha/\">webmentions.vercel.app/posts/alpha/\n\"u-mention\" href=\"https://webmentions.vercel.app/\">", "text": "I assume the copy of Edge runs on Ubuntu? webmentions.vercel.app/posts/alpha/" }, "mention-of": "https://webmentions.vercel.app/posts/alpha/", "wm-property": "mention-of", "wm-private": false }, { "type": "entry", "author": { "type": "card", "name": "? cannot even", "photo": "https://webmention.io/avatar/pbs.twimg.com/1f2ab7fe8fb6c20b4a2be803b95f6559677d0b88577a091c2b1755f70dff4247.jpg", "url": "https://twitter.com/diffalot" }, "url": "https://twitter.com/diffalot/status/1365406879459860480", "published": "2021-02-26T21:02:22+00:00", "wm-received": "2021-02-26T21:23:06Z", "wm-id": 1048716, "wm-source": "https://brid.gy/post/twitter/raymondcamden/1365406879459860480", "wm-target": "https://webmentions.vercel.app/posts/alpha/", "content": { "html": "Testing webmentions Alpha Post \"https://webmentions.vercel.app/posts/alpha/\">webmentions.vercel.app/posts/alpha/", "text": "Testing webmentions Alpha Post webmentions.vercel.app/posts/alpha/" }, "mention-of": "https://webmentions.vercel.app/posts/alpha/", "wm-property": "mention-of", "wm-private": false } ] }

What are some alternatives?

When comparing sanitize-html and webmention.io you can also consider the following projects:

DOMPurify - DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:

commento - A fast, bloat-free comments platform (Github mirror)

js-xss - Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist

commento-ansible-playbook - Host a free commento.io instance at home or in the cloud with auto-renewing SSL certs and Dynamic DNS, all in just 5 minutes!

xss-filters

disqus-analytics - A set of tools to provide additional analytics of Disqus data

SuperTokens Community - Open source alternative to Auth0 / Firebase Auth / AWS Cognito

staticman - 💪 User-generated content for Git-powered websites

Retire.js - scanner detecting the use of JavaScript libraries with known vulnerabilities. Can also generate an SBOM of the libraries it finds.

swarmbase - swarmbase is a peer-to-peer dweb database with access control

insane - :pouting_cat: Lean and configurable whitelist-oriented HTML sanitizer

eleventy-demos - Demos of the Eleventy SSG