Update strategy to use css
Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
parent
c4a9da41ba
commit
99a9b5f9a2
2 changed files with 9 additions and 11 deletions
|
@ -1,5 +1,3 @@
|
|||
import { blackListManager } from "./BlackListManager";
|
||||
|
||||
export class HtmlUtils {
|
||||
public static getElementByIdOrFail<T extends HTMLElement>(id: string): T {
|
||||
const elem = document.getElementById(id);
|
||||
|
@ -27,14 +25,10 @@ export class HtmlUtils {
|
|||
}
|
||||
|
||||
public static escapeHtml(html: string): string {
|
||||
let innerHTML = "";
|
||||
const tabBackLine = html.match(/(\n\r|\r\n|\r|\n)/g);
|
||||
for (const text in blackListManager) {
|
||||
const p = document.createElement("p");
|
||||
p.appendChild(document.createTextNode(text));
|
||||
innerHTML += p.innerHTML;
|
||||
}
|
||||
return innerHTML;
|
||||
const text = document.createTextNode(html);
|
||||
const p = document.createElement("p");
|
||||
p.appendChild(text);
|
||||
return p.innerHTML;
|
||||
}
|
||||
|
||||
public static urlify(text: string, style: string = ""): string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue