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:
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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>");
|
||||
}
|
||||
Reference in New Issue
Block a user