Browse Source

Fix wrapping plain text

master
Eduard Kuzmenko 3 years ago
parent
commit
5bb8dca8b4
  1. 4
      .env
  2. 2
      src/lib/richtextprocessor.ts

4
.env

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

2
src/lib/richtextprocessor.ts

@ -901,7 +901,7 @@ namespace RichTextProcessor { @@ -901,7 +901,7 @@ namespace RichTextProcessor {
/**
* ! 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) {
entities = entities.filter(entity => entity._ === 'messageEntitySpoiler');
}

Loading…
Cancel
Save