make-apple-motion: replace xml.sax.saxutils.xmlescape with custom routine, which also escapes quotes
xml.sax.saxutils.xmlescape is only a str.replace in a trencoat anyways.
This commit is contained in:
parent
a9cbfc5eb3
commit
21a8e014ef
1 changed files with 7 additions and 2 deletions
|
@ -11,8 +11,6 @@ import sys
|
|||
import os
|
||||
import re
|
||||
|
||||
from xml.sax.saxutils import escape as xmlescape
|
||||
|
||||
# Parse arguments
|
||||
parser = argparse.ArgumentParser(
|
||||
description='C3VOC Intro-Outro-Generator - Variant to use with apple Motion Files',
|
||||
|
@ -155,6 +153,13 @@ def run_output(command, **kwargs):
|
|||
os.system(f'{cmd} >{t.name} 2>&1')
|
||||
return t.read().decode('utf-8')
|
||||
|
||||
def xmlescape(xml):
|
||||
xml = xml.replace("&", "&")
|
||||
xml = xml.replace("<", "<")
|
||||
xml = xml.replace(">", ">")
|
||||
xml = xml.replace("\"", """)
|
||||
xml = xml.replace("'", "'")
|
||||
return xml
|
||||
|
||||
def enqueue_job(event):
|
||||
event_id = str(event['id'])
|
||||
|
|
Loading…
Add table
Reference in a new issue