Simplify types (#28749)
This commit is contained in:
+3
-4
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { LegacyRef, ReactNode } from "react";
|
||||
import sanitizeHtml from "sanitize-html";
|
||||
import sanitizeHtml, { IOptions } from "sanitize-html";
|
||||
import classNames from "classnames";
|
||||
import katex from "katex";
|
||||
import { decode } from "html-entities";
|
||||
@@ -19,7 +19,6 @@ import { Optional } from "matrix-events-sdk";
|
||||
import escapeHtml from "escape-html";
|
||||
import { getEmojiFromUnicode } from "@matrix-org/emojibase-bindings";
|
||||
|
||||
import { IExtendedSanitizeOptions } from "./@types/sanitize-html";
|
||||
import SettingsStore from "./settings/SettingsStore";
|
||||
import { stripHTMLReply, stripPlainReply } from "./utils/Reply";
|
||||
import { PERMITTED_URL_SCHEMES } from "./utils/UrlUtils";
|
||||
@@ -126,7 +125,7 @@ export function isUrlPermitted(inputUrl: string): boolean {
|
||||
}
|
||||
|
||||
// this is the same as the above except with less rewriting
|
||||
const composerSanitizeHtmlParams: IExtendedSanitizeOptions = {
|
||||
const composerSanitizeHtmlParams: IOptions = {
|
||||
...sanitizeHtmlParams,
|
||||
transformTags: {
|
||||
"code": transformTags["code"],
|
||||
@@ -135,7 +134,7 @@ const composerSanitizeHtmlParams: IExtendedSanitizeOptions = {
|
||||
};
|
||||
|
||||
// reduced set of allowed tags to avoid turning topics into Myspace
|
||||
const topicSanitizeHtmlParams: IExtendedSanitizeOptions = {
|
||||
const topicSanitizeHtmlParams: IOptions = {
|
||||
...sanitizeHtmlParams,
|
||||
allowedTags: [
|
||||
"font", // custom to matrix for IRC-style font coloring
|
||||
|
||||
Reference in New Issue
Block a user