Fix wrapping plain text

This commit is contained in:
Eduard Kuzmenko 2022-01-18 20:03:18 +04:00
parent 93d389ae39
commit 5bb8dca8b4
2 changed files with 3 additions and 3 deletions

4
.env
View File

@ -1,5 +1,5 @@
API_ID=1025907 API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750 API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.0.3 VERSION=1.0.3
VERSION_FULL=1.0.3 (66) VERSION_FULL=1.0.3 (68)
BUILD=66 BUILD=68

View File

@ -901,7 +901,7 @@ namespace RichTextProcessor {
/** /**
* ! This function is still unsafe to use with .innerHTML * ! This function is still unsafe to use with .innerHTML
*/ */
export function wrapPlainText(text: string, entities?: MessageEntity[]) { export function wrapPlainText(text: string, entities: MessageEntity[] = []) {
if(entities?.length) { if(entities?.length) {
entities = entities.filter(entity => entity._ === 'messageEntitySpoiler'); entities = entities.filter(entity => entity._ === 'messageEntitySpoiler');
} }