rDrama/files/routes
painejohn cbcc2aac6f
139: Disabled multimedia embedding
This change disables multimedia embedding:

- In comments and comments replies.
- In new submissions.
- In comment & submission preview

And it's all toggle-able via an envvar, except for the JS bits,
but I linked those to the github issue, so should be easy to find
in the future.

The way it works is:

- removes markdown image/video syntax,
  eg. `![](https://example.org/someimage.jpg)` into ``
- changes link text into anchors, eg.
  `https://example.org/someimage.jpg` into
  `[https://example.org/someimage.jpg](https://example.org/someimage.jpg)`
- removes html img/video/audio tags, eg.
  `<img href="https://example.org/someimage.jpg" />` into ``
- when embedding gifs via the giphy modal in "new submission", it will
  insert only an anchor to the gif
- when attaching an image, it will upload the image, then add only an
  anchor to the post/comment body

I tested this manually, but not sure if I got all the test cases. What I
checked was:

- create comment w/ image/video/audio media using markdown -> success
- create comment reply w/ image/video/audio media using markdown ->
  success
- create comment w/ link to img/imgur/youtube/audio -> success
- create comment w/ attachment -> success
- create comment reply w/ attachment -> success
- create comment w/ img/video tag -> success
- create comment reply w/ image/video tag -> success
- create post submission w/ image/video/media using markdown -> success
- create post submission w/ link to img/imgur/youtube/audio -> success
- create post submission w/ attachment -> success
- create post submission w/ giphy gif -> success

Also, updated the formatting page.

Co-authored-by: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
2022-08-07 01:30:47 -05:00
..
__init__.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
admin.py Support settings for integers and allow setting filter settings in UI 2022-07-09 06:33:41 -05:00
awards.py Remove some gimmicky r/drama features. 2022-05-21 21:43:00 -05:00
chat.py Remove some gimmicky r/drama features. 2022-05-21 21:43:00 -05:00
comments.py 139: Disabled multimedia embedding 2022-08-07 01:30:47 -05:00
discord.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
errors.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
feeds.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
front.py Merge branch 'frost' into new-user-filtering 2022-06-06 14:56:28 -04:00
giphy.py Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
login.py Fixes #110 "Signout doesn't always work" 2022-07-29 06:47:19 -05:00
oauth.py Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
posts.py 139: Disabled multimedia embedding 2022-08-07 01:30:47 -05:00
reporting.py Switch over comment reporting to use the new system 2022-07-09 06:33:41 -05:00
search.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
settings.py Remove some gimmicky r/drama features. 2022-05-21 21:43:00 -05:00
static.py Made a lot of small changes in the frontend 2022-06-04 07:48:26 -05:00
subs.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
users.py Split SITE_NAME into computer-readable SITE_ID and human-readable SITE_TITLE. 2022-07-31 18:53:18 -05:00
votes.py Merge pull request #123 from zorbathut/pr_linearvote 2022-07-29 10:17:18 -04:00