@compodoc/compodoc
Version:
The missing documentation tool for your Angular application
14 lines (12 loc) • 420 B
text/typescript
import { IHtmlEngineHelper } from './html-engine-helper.interface';
export class EscapeSimpleQuoteHelper implements IHtmlEngineHelper {
public helperFunc(context: any, text: string) {
if (!text) {
return;
}
text = text.replace(/'/g, "\\'");
text = text.replace(/(\r\n|\n|\r)/gm, '');
text = text.replace(/<\/script/gi, '<\\/script');
return text;
}
}