From a67c70a449cd92d2e2c7d9b7bca33aed5896f8f1 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Wed, 26 Jul 2023 19:39:06 +0200 Subject: [PATCH 01/12] Allow selecting from all languages in person settings (fixes #1971) (#1985) --- lemmy-translations | 2 +- src/shared/components/person/settings.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lemmy-translations b/lemmy-translations index a1a19aea..713ceed9 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit a1a19aea1ad7d91195775a5ccea62ccc9076a2c7 +Subproject commit 713ceed9c7ef84deaa222e68361e670e0763cd83 diff --git a/src/shared/components/person/settings.tsx b/src/shared/components/person/settings.tsx index d024aae2..1db77c9f 100644 --- a/src/shared/components/person/settings.tsx +++ b/src/shared/components/person/settings.tsx @@ -587,6 +587,7 @@ export class Settings extends Component { selectedLanguageIds={selectedLangs} multiple={true} showLanguageWarning={true} + showAll={true} showSite onChange={this.handleDiscussionLanguageChange} /> From 925d9624d5550f5166849407dc92d0df84389c75 Mon Sep 17 00:00:00 2001 From: creesch Date: Wed, 26 Jul 2023 19:41:57 +0200 Subject: [PATCH 02/12] Allow limited set of markdown in title rendering (#1977) --- src/shared/markdown.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/shared/markdown.ts b/src/shared/markdown.ts index 33afd716..142000d8 100644 --- a/src/shared/markdown.ts +++ b/src/shared/markdown.ts @@ -23,6 +23,14 @@ export let md: MarkdownIt = new MarkdownIt(); export let mdNoImages: MarkdownIt = new MarkdownIt(); +// Zero disables all rules. +// Only explicitly allow a limited set of rules safe for use in post titles. +export const mdLimited: MarkdownIt = new MarkdownIt("zero").enable([ + "emphasis", + "backticks", + "strikethrough", +]); + export const customEmojis: EmojiMartCategory[] = []; export let customEmojisLookup: Map = new Map< @@ -43,7 +51,7 @@ export function mdToHtmlNoImages(text: string) { } export function mdToHtmlInline(text: string) { - return { __html: md.renderInline(text) }; + return { __html: mdLimited.renderInline(text) }; } const spoilerConfig = { From 2ccaaf1bcd1729b34a8ce66d25e32100e3191cee Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 26 Jul 2023 15:51:43 -0400 Subject: [PATCH 03/12] Make sure comment score color matches your vote. (#1988) * Make sure comment score color matches your vote. * Fixing lints. --- src/shared/components/comment/comment-node.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index c2223dfb..4bfd6231 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -348,7 +348,7 @@ export class CommentNode extends Component { {showScores() && ( <> Date: Wed, 26 Jul 2023 17:11:40 -0400 Subject: [PATCH 04/12] Fixing comment report showing dot. (#1989) * Fixing comment report showing dot. * Using list-unstyled instead of removing