77 about page
Created by: ri-pandey
Description
Made the About page's text editable via a markdown editor.
Related Issue(s)
Closes #77 (closed)
If applicable, please reference the issue(s) that this PR addresses. If the PR does not address any specific issue, you can remove this section.
Changes Made
List the main changes made in this PR. Be as specific as possible.
-
Feature added -
Code refactored -
Other changes: [describe] -
Made the About page editable via a markdown input.
-
Persisted markdown is rendered as HTML in the /about page, as well as in the Live Preview.
-
After retrieval,
md.render()
is used to convert persisted markdown to HTML, which strips out potentially-malicious elements from the markdown (likejavascript:
). The generated HTML is then sent toDOMPurify.sanitize()
which is an HTML-sanitizer built for protection against XSS attacks. This sanitized HTML is then displayed to the user. -
To continue allowing unauthenticated users into the /about page, the endpoint to fetch the latest About text is unauthenticated, and rate-limited for security.
Screenshots (if applicable)
Desktop View
Mobile View (horizontal scroll in effect)
Checklist
Before submitting this PR, please make sure that:
-
Your code passes linting and coding style checks. -
Documentation has been updated to reflect the changes. -
You have reviewed your own code and resolved any merge conflicts. -
You have requested a review from at least one team member. -
Any relevant issue(s) have been linked to this PR.