escape unwanted markdown characters in names

This commit is contained in:
zoe 2022-10-01 17:32:49 +02:00
parent 6fe0f6967e
commit f18518ad63
2 changed files with 5 additions and 2 deletions

View File

@ -19,7 +19,11 @@ class NameDisplay extends StatelessWidget {
newtext = newtext
.replaceAll("~", r"\~")
.replaceAll("_", r"\_")
.replaceAll("*", r"\*");
.replaceAll("*", r"\*")
.replaceAll("[", r"\[")
.replaceAll("]", r"\]")
.replaceAll("(", r"\(")
.replaceAll(")", r"\)");
for (var e in emoji) {
newtext = insertEmojiInMd(newtext, e);
}

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:localization/localization.dart';
import 'package:loris/business_logic/account/account.dart';
import 'package:loris/business_logic/emoji/emoji.dart';