Updates regex for drafts, userposts, and create usecases
Implements comment validation
Implements new creation and mini-creation editor button for images
Changes current picture system for posts and comments to support images on posts and comments
Adds additional images within the fold for posts
Ensures there are no duplicates, hot links, or too many images within posts and comments
Auto removes hot links on posts and comments, does not auto remove duplicates
Lefts align post.text
Changes markdown engine from marked to markdown-it
New custom image markdown for user uploaded images
Old image markdown is no longer supported
Makes post and comment images smaller on larger screens
Updates NOTICE file for new copyrights
Details
- Reviewers
Info-Screen - Group Reviewers
Security - Maniphest Tasks
- T208: Deprecate external images
T204: Left align post.text
T133: Allow user uploaded images in posts and comments - Commits
- rWCLde27314439ac: Images
Make a post with no images
Make a post with images
Make a comment with an image
Make a comment without an image
Save drafts
Delete drafts
Delete post from postview
Make a comment and post with invalid markdown(hotlinks, duplicates, etc)
`[](https://static.wildfyre.net/wildfyre.png)fg
cgvbhncfgh
fgdfgd cfghghjfghjfghjfghjfghjfghjfghjfghj
vhnjm,gvhj
fg
dfgh
h fg
fgh
y[]fg
y[]fg
fg
! [undefined] (https://static.wildfyre.net/wildfyre.png "undefined" ) ]
https://static.wildfyre.net/wildfyre.png fg
`
Diff Detail
- Repository
- rWCL Web Client
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Client side filter implemented, Still to add/fix: comment images, hotlink auto removal, and fix when not a draft
- Duplicate Regex /\[?(!\s*\[[^\]]*\]\s*\((.*?)\s*("(?:.*[^"])?")?\s*\))\s*\]?\s*(?:(\(.*?\)))?/g: 10 times
- Images are way to big on desktop
- The upload uri is not guaranteed to stay this way (chances are actually pretty high that it won't), do not post the exact image location to the api.
It would be best to add a new tag (e.g. [img:<id>] and then configure the marked parser and lexer to understand that tag and pull the required information form the additional_images array (see: https://marked.js.org/#/USING_PRO.md)
- Image in attachment area is way to big. Crop them down.
Could we edit the error a bit. Inform the user that they try to insert an image that doesn't exist etc not just say the "markdown does not exist".
src/app/_models/constants.ts | ||
---|---|---|
3 | use \d* to allow larger image nums (unlikely to happen but not excluded by docs) and I don't really like that there has to be a space. | |
3 | multiline flag seems not useful here | |
src/app/home/home.component.html | ||
60 | Consider adding rel="noopener noreferrer" to avoid later copy paste issues (and it might also bring some small performance benefits). Same for other uses of target. |