Commit graph

8 commits

Author SHA1 Message Date
kr4ssi e391a80d65 Allow alt-attribute on <img>-tags
https://www.w3.org/html/wg/wiki/IssueAltAttribute
2021-01-28 19:32:33 -09:00
Calvin Montgomery 62417f7fb8
Add eslint (#741) 2018-04-07 15:30:30 -07:00
Calvin Montgomery 22a9acfc90 Support proxying chat images via camo
Camo: https://github.com/atmos/camo.  This has a couple advantages over
just allowing images to be dumped as-is:

  - Prevents mixed-content warnings by allowing the server to proxy HTTP
    images to an HTTPS camo instance
  - Protects users' privacy by not exposing their browser directly to
    the image host
  - Allows the camo proxy to intercept and reject bad image sources
    (URLs that are not actually images, gigapixel-sized images likely to
    DoS users' browsers, etc.)

Whitelisting specific domains is supported for cases where the source is
known to be trustworthy.
2017-05-28 19:38:43 -07:00
Calvin Montgomery f6500ff745 Fix emote regex due to sanitize-html changes 2017-03-14 21:36:44 -07:00
Xaekai 0bafe9f2d7 Add missing comma 2016-07-08 00:04:20 -07:00
Xaekai 9f4d2c7ffb Add some various harmless tags to the XSS whitelist
sub, sup: Closes #579
cite, small: Bootstrap uses these for blockquotes
template: Will allow for cleaner channel scripts. Since it's contents are inert it will also allow channel admins to have "comments" in their banner.
2016-07-07 21:52:34 -07:00
calzoneman d61005e419 Add rel=noopener noreferrer to autogenerated links 2016-05-04 20:58:18 -07:00
calzoneman 0109a87e55 package: build with babel for ES2015 support
* Rename lib/ -> src/
* Add `postinstall` npm target for compiling src files to lib
* Add `build-watch` npm target for development with babel --watch
* Add `lib/` to .gitignore
* Add `source-map-support` module for babel-generated sourcemaps
2015-09-23 19:27:04 -07:00
Renamed from lib/xss.js (Browse further)