mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Fix a bunch of hardcoded borders + autofmt
This commit is contained in:
@@ -250,15 +250,10 @@ Item {
|
||||
const htmlRegex = /<\/?[a-zA-Z][\s\S]*>/;
|
||||
|
||||
if (htmlRegex.test(str)) {
|
||||
return str;
|
||||
return str;
|
||||
}
|
||||
|
||||
const escaped = str
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
const escaped = str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
||||
|
||||
const withBreaks = escaped.replace(/\r\n|\r|\n/g, "<br/>");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user