diff --git a/ansi_up.d.ts b/ansi_up.d.ts index dd40842..021f331 100644 --- a/ansi_up.d.ts +++ b/ansi_up.d.ts @@ -12,7 +12,7 @@ export declare class AnsiUp { private _csi_regex; private _osc_st; private _osc_regex; - private _url_whitelist; + private _url_acceptlist; private _escape_html; private _buffer; private _boldStyle; @@ -22,8 +22,8 @@ export declare class AnsiUp { constructor(); set use_classes(arg: boolean); get use_classes(): boolean; - set url_whitelist(arg: {}); - get url_whitelist(): {}; + set url_acceptlist(arg: {}); + get url_acceptlist(): {}; set escape_html(arg: boolean); get escape_html(): boolean; set boldStyle(arg: string); diff --git a/ansi_up.js b/ansi_up.js index 0668afa..ee92437 100644 --- a/ansi_up.js +++ b/ansi_up.js @@ -24,7 +24,7 @@ export class AnsiUp { this.underline = false; this.fg = this.bg = null; this._buffer = ''; - this._url_whitelist = { 'http': 1, 'https': 1 }; + this._url_acceptlist = { 'http': 1, 'https': 1 }; this._escape_html = true; this.boldStyle = 'font-weight:bold'; this.faintStyle = 'opacity:0.7'; @@ -37,11 +37,11 @@ export class AnsiUp { get use_classes() { return this._use_classes; } - set url_whitelist(arg) { - this._url_whitelist = arg; + set url_acceptlist(arg) { + this._url_acceptlist = arg; } - get url_whitelist() { - return this._url_whitelist; + get url_acceptlist() { + return this._url_acceptlist; } set escape_html(arg) { this._escape_html = arg; @@ -409,7 +409,7 @@ export class AnsiUp { let parts = pkt.url.split(':'); if (parts.length < 1) return ''; - if (!this._url_whitelist[parts[0]]) + if (!this._url_acceptlist[parts[0]]) return ''; let result = `${this.escape_txt_for_html(pkt.text)}`; return result; diff --git a/ansi_up.ts b/ansi_up.ts index 19e96fd..5097cd6 100644 --- a/ansi_up.ts +++ b/ansi_up.ts @@ -77,7 +77,7 @@ export class AnsiUp private _osc_st:RegExp; private _osc_regex:RegExp; - private _url_whitelist:{}; + private _url_acceptlist:{}; private _escape_html:boolean; private _buffer:string; @@ -102,7 +102,7 @@ export class AnsiUp this._buffer = ''; - this._url_whitelist = { 'http':1, 'https':1 }; + this._url_acceptlist = { 'http':1, 'https':1 }; this._escape_html = true; this.boldStyle = 'font-weight:bold'; @@ -121,14 +121,14 @@ export class AnsiUp return this._use_classes; } - set url_whitelist(arg:{}) + set url_acceptlist(arg:{}) { - this._url_whitelist = arg; + this._url_acceptlist = arg; } - get url_whitelist():{} + get url_acceptlist():{} { - return this._url_whitelist; + return this._url_acceptlist; } set escape_html(arg:boolean) @@ -746,7 +746,7 @@ export class AnsiUp if (parts.length < 1) return ''; - if (! this._url_whitelist[parts[0]]) + if (! this._url_acceptlist[parts[0]]) return ''; let result = `${this.escape_txt_for_html(pkt.text)}`;