Various improvements

This commit is contained in:
barsdeveloper
2022-11-09 22:14:30 +01:00
parent 97a9c99732
commit aa7c9932f0
26 changed files with 293 additions and 103 deletions

View File

@@ -236,8 +236,9 @@ export default class Utility {
/** @param {String} value */
static clearHTMLWhitespace(value) {
return value
.replaceAll(" ", "\u00A0")
.replaceAll("<br>", "\n")
.replaceAll("&nbsp;", "\u00A0") // whitespace
.replaceAll("<br>", "\n") // newlines
.replaceAll(/(\<!--.*?\-->)/g, "") // html comments
}
/** @param {String} value */