UNPKG

903 BTypeScriptView Raw
1import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
2/**
3 * A class to sanitize HTML strings.
4 */
5export declare class Sanitizer implements IRenderMime.ISanitizer {
6 /**
7 * Sanitize an HTML string.
8 *
9 * @param dirty - The dirty text.
10 *
11 * @param options - The optional sanitization options.
12 *
13 * @returns The sanitized string.
14 */
15 sanitize(dirty: string, options?: IRenderMime.ISanitizerOptions): string;
16 /**
17 * @returns Whether to replace URLs by HTML anchors.
18 */
19 getAutolink(): boolean;
20 /**
21 * Set the allowed schemes
22 *
23 * @param scheme Allowed schemes
24 */
25 setAllowedSchemes(scheme: Array<string>): void;
26 /**
27 * Set the URL replacement boolean.
28 *
29 * @param autolink URL replacement boolean.
30 */
31 setAutolink(autolink: boolean): void;
32 private _autolink;
33 private _options;
34}