#1408 Removing crypto-random-string and he

This commit is contained in:
Knut Sveidqvist
2020-05-13 19:14:18 +02:00
parent d7d248fd04
commit 6d076284e8
7 changed files with 113 additions and 16 deletions

View File

@@ -2,8 +2,8 @@
* Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render
* the diagrams to svg code.
*/
import he from 'he';
// import { decode } from 'he';
import decode from 'entity-decode/browser';
import mermaidAPI from './mermaidAPI';
import { logger } from './logger';
/**
@@ -94,8 +94,7 @@ const init = function() {
txt = element.innerHTML;
// transforms the html to pure text
txt = he
.decode(txt)
txt = decode(txt)
.trim()
.replace(/<br\s*\/?>/gi, '<br/>');