Commit Graph

13 Commits (ebb4de7d3e01f59d0eeb55d9d398875ff3266211)

Author SHA1 Message Date
Claire 3ad6ef72cb Merge branch 'main' into glitch-soc/merge-upstream 4 years ago
Claire a4dcaef53b
Prepare Mastodon for zeitwerk autoloader (#15917)
* Prepare Mastodon for zeitwerk autoloader (Rails 6)

Add inflections and rename/move a few classes.

In particular, app/lib/exceptions.rb and app/lib/sanitize_config.rb
were manually loaded while still in autoload paths.

* Add inflection for Url → URL
4 years ago
Thibaut Girka f186e0c91c Add support for “start” and “reversed” attributes to ol element
Fixes #1367
5 years ago
Ben Lubar ead09f5ddc
Fix exception when trying to serialize posts with <a> tags in them without hrefs (#1334)
* fix exception when trying to serialize posts with <a> tags in them without hrefs

* Add tests

Co-authored-by: Thibaut Girka <thib@sitedethib.com>
5 years ago
Thibaut Girka 02f1c04fab Make sanitizer *not* add no-referrer etc. in local markdown toots if the link is “safe” 5 years ago
Thibaut Girka 2c510ee00a Fix glitch-soc marking every link in toots as a tag
Fixes #1281
5 years ago
Thibaut Girka 432033743c Fix tests
Well, kinda, it's actually a bug from glitch-soc, but we will have to address it separately.
5 years ago
Thibaut Girka dae5e446fe Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `Gemfile`:
  We updated httplog in a separate commit.
  Took upstream's change which updated it further.
- `Gemfile.lock`:
  We updated httplog in a separate commit.
  Took upstream's change which updated it further.
- `app/lib/sanitize_config.rb`:
  Upstream added better unsupported link stripping,
  while we had different sanitizing configs.
  Took only upstream's link stripping code.
- `config/locales/simple_form.pl.yml`:
  Strings unused in glitch-soc had been removed from
  glitch-soc, reintroduced them even if they are not
  useful, to reduce the risk of later merge conflicts.
5 years ago
Eugen Rochko b1349342d2
Fix rendering `<a>` without `href` when scheme unsupported (#13040)
- Disallow links with relative paths
- Disallow iframes with non-http protocols and relative paths

Close #13037
5 years ago
BSKY fccf83e1f2 Add noopener and/or noreferrer (#12202) 6 years ago
ThibG fda437a020 Fix sanitizing lists contents (#11354)
* Add test

* Fix code for sanitizing nested lists stripping all tags
6 years ago
Thibaut Girka 356e9150df Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/lib/sanitize_config.rb
  Keep our version, we support the tags upstream transforms.
- package.json
- yarn.lock
6 years ago
Eugen Rochko 103a9f4466
Fix sanitizer making block level elements unreadable (#10836)
Fix #10834
6 years ago