fix(front): anonymous participant text is plain text, avoid using v-html

It was using v-html when opening to "view more"

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-12-06 11:18:05 +01:00
parent ffff379d47
commit 2c12fbfd09
4 changed files with 6 additions and 21 deletions

View File

@@ -1,4 +1,3 @@
import nl2br from "@/filters/utils";
import {
formatDateString,
formatTimeString,
@@ -11,6 +10,5 @@ export default {
vue.filter("formatDateString", formatDateString);
vue.filter("formatTimeString", formatTimeString);
vue.filter("formatDateTimeString", formatDateTimeString);
vue.filter("nl2br", nl2br);
},
};

View File

@@ -1,9 +0,0 @@
/**
* New Line to <br>
*
* @param {string} str Input text
* @return {string} Filtered text
*/
export default function nl2br(str: string): string {
return `${str}`.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, "$1<br>");
}