Minor fixes from enterprise codebase

This commit is contained in:
Tom Moor
2023-02-12 16:31:15 -05:00
parent 33afa2f029
commit e028715afb
3 changed files with 14 additions and 0 deletions

View File

@@ -202,6 +202,10 @@ async function documentImporter({
// to match our hardbreak parser.
text = text.replace(/<br>/gi, "\\n");
// Escape any dollar signs in the text to prevent them being interpreted as
// math blocks
text = text.replace(/\$/g, "\\$");
// find data urls, convert to blobs, upload and write attachments
const images = parseImages(text);
const dataURIs = images.filter((href) => href.startsWith("data:"));