* fix: code blocks of unknown languages cause HTML injection
A code block of unknown language (that is, a language not treated as special by Memos and not handled by highlight.js) should fall back on rendering its plaintext content. However, the content is never properly escaped before it is appended to the DOM, and thus any string that happens to contain HTML is unsafely rendered. This commit fixes the issue by ensuring that, when none of the previous cases handle the text, any HTML entities are escaped first.
* Update CodeBlock.tsx to conform to eslint
* Added hook for generating different date times
* Fixed up logic to destructure the datetime params
---------
Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
* Centralised the logic for filters to apply to tagging and updated components to pass in those params needed
* Fixed linting issue
* Split out params from options
* Fixed linting errors
---------
Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (260 of 260 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (260 of 260 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
---------
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
* Translated using Weblate (Turkish)
Currently translated at 100.0% (259 of 259 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (259 of 259 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
* Apply suggestions from code review
---------
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (257 of 257 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (257 of 257 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
---------
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Ramazan SANCAR <ramazansancar4545@gmail.com>
Translated using Weblate (French)
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/
Co-authored-by: Ezmana <ezmana.land@gmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
Co-authored-by: Coisini-H <2972186196@qq.com>
* Translated using Weblate (Japanese)
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
* Translated using Weblate (Chinese (Traditional))
Currently translated at 99.6% (254 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/
---------
Co-authored-by: Somme4096 <somme4096@gmail.com>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Translated using Weblate (Hungarian)
Currently translated at 98.6% (299 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hu/
Co-authored-by: Vermunds <33235701+Vermunds@users.noreply.github.com>
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (303 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
Co-authored-by: Sung Kim <1740603900@qq.com>
Translated using Weblate (French)
Currently translated at 99.6% (302 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/
Co-authored-by: Alexis <alexisl61@outlook.fr>
Translated using Weblate (English)
Currently translated at 100.0% (303 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/en/
Co-authored-by: noxonad <noxonad@proton.me>
Translated using Weblate (French)
Currently translated at 99.6% (302 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/
Co-authored-by: Alexis <alexisl61@outlook.fr>
Translated using Weblate (Russian)
Currently translated at 90.4% (274 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ru/
Co-authored-by: sergeybutakov <pushkagun@gmail.com>
* Translated using Weblate (Turkish)
Currently translated at 100.0% (303 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (302 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
---------
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>