XML unescape WordBoundary text sent from metadata (#378)

Turns out Microsoft sends them XML escaped even though it's in JSON...

Signed-off-by: rany <rany2@riseup.net>
This commit is contained in:
rany2
2025-05-03 13:28:50 +03:00
committed by GitHub
parent c5b0cc9cb1
commit 7d03a08757

View File

@@ -20,7 +20,7 @@ from typing import (
Tuple,
Union,
)
from xml.sax.saxutils import escape
from xml.sax.saxutils import escape, unescape
import aiohttp
import certifi
@@ -401,7 +401,7 @@ class Communicate:
"type": meta_type,
"offset": current_offset,
"duration": current_duration,
"text": meta_obj["Data"]["text"]["Text"],
"text": unescape(meta_obj["Data"]["text"]["Text"]),
}
if meta_type in ("SessionEnd",):
continue