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:
@@ -20,7 +20,7 @@ from typing import (
|
|||||||
Tuple,
|
Tuple,
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
from xml.sax.saxutils import escape
|
from xml.sax.saxutils import escape, unescape
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import certifi
|
import certifi
|
||||||
@@ -401,7 +401,7 @@ class Communicate:
|
|||||||
"type": meta_type,
|
"type": meta_type,
|
||||||
"offset": current_offset,
|
"offset": current_offset,
|
||||||
"duration": current_duration,
|
"duration": current_duration,
|
||||||
"text": meta_obj["Data"]["text"]["Text"],
|
"text": unescape(meta_obj["Data"]["text"]["Text"]),
|
||||||
}
|
}
|
||||||
if meta_type in ("SessionEnd",):
|
if meta_type in ("SessionEnd",):
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user