prettier
This commit is contained in:
@@ -37,7 +37,7 @@ export type CoWebsite = {
|
||||
iframe: HTMLIFrameElement;
|
||||
// icon: HTMLDivElement;
|
||||
position: number;
|
||||
state : CoWebsiteState;
|
||||
state: CoWebsiteState;
|
||||
};
|
||||
|
||||
type CoWebsiteSlot = {
|
||||
@@ -539,7 +539,7 @@ class CoWebsiteManager {
|
||||
|
||||
const coWebsite = {
|
||||
iframe,
|
||||
state : CoWebsiteState.OPENED,
|
||||
state: CoWebsiteState.OPENED,
|
||||
position: position ?? this.coWebsites.length,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const sanitizeHtml = require('sanitize-html');
|
||||
const sanitizeHtml = require("sanitize-html");
|
||||
|
||||
export class HtmlUtils {
|
||||
public static getElementByIdOrFail<T extends HTMLElement>(id: string): T {
|
||||
@@ -33,22 +33,22 @@ export class HtmlUtils {
|
||||
return p.innerHTML;
|
||||
}
|
||||
|
||||
public static sanitize(html : string | number | boolean | undefined): string {
|
||||
public static sanitize(html: string | number | boolean | undefined): string {
|
||||
if (typeof html === "string") {
|
||||
return sanitizeHtml(html, {
|
||||
allowedAttributes: {
|
||||
'span': ['style'],
|
||||
},
|
||||
allowedStyles: {
|
||||
'span': {
|
||||
'color': [/^#(0x)?[0-9a-f]+$/i, /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/],
|
||||
'font-size': [/^\d+(?:px|em|%)$/]
|
||||
}
|
||||
}
|
||||
allowedAttributes: {
|
||||
span: ["style"],
|
||||
},
|
||||
allowedStyles: {
|
||||
span: {
|
||||
color: [/^#(0x)?[0-9a-f]+$/i, /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/],
|
||||
"font-size": [/^\d+(?:px|em|%)$/],
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static urlify(text: string, style: string = ""): string {
|
||||
const urlRegex = /(https?:\/\/[^\s]+)/g;
|
||||
|
||||
@@ -129,7 +129,7 @@ class JitsiFactory {
|
||||
* Slugifies the room name and prepends the room name with the instance
|
||||
*/
|
||||
public getRoomName(roomName: string, instance: string): string {
|
||||
if (!instance || instance == '') {
|
||||
if (!instance || instance == "") {
|
||||
return slugify(roomName);
|
||||
}
|
||||
return slugify(instance.replace("/", "-") + "-" + roomName);
|
||||
|
||||
Reference in New Issue
Block a user