2019-08-20 04:40:31 +02:00
|
|
|
/*---------------------------------------------------------------------------------------------
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
|
2020-10-08 10:07:38 +02:00
|
|
|
export interface InsaneOptions {
|
|
|
|
readonly allowedSchemes?: readonly string[],
|
|
|
|
readonly allowedTags?: readonly string[],
|
|
|
|
readonly allowedAttributes?: { readonly [key: string]: string[] },
|
|
|
|
readonly filter?: (token: { tag: string, attrs: { readonly [key: string]: string } }) => boolean,
|
|
|
|
}
|
|
|
|
|
2019-09-18 16:05:59 +02:00
|
|
|
export function insane(
|
2019-08-20 04:40:31 +02:00
|
|
|
html: string,
|
2020-10-08 10:07:38 +02:00
|
|
|
options?: InsaneOptions,
|
2019-08-20 04:40:31 +02:00
|
|
|
strict?: boolean,
|
|
|
|
): string;
|