adl-submit.py: use <base> in order to load remote resources in preview

This commit is contained in:
Florent Fayolle 2018-10-29 21:26:34 +01:00
parent 88c4220332
commit ee18ee36e1
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ def SubmitEvent(event, testOutputFile):
sys.exit(0)
fp = open(testOutputFile, "w")
s = contents.getvalue().decode()
s = re.sub(r'href="([A-Za-z0-9]*).css"', r'href="'+baseUrl+'\1.css"', s)
s = re.sub(r'<head.*>', r'\g<0><base href="%s">' % baseUrl, s, flags=re.IGNORECASE)
fp.write(s)
fp.close()