Merge branch 'master' into 'master'

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

See merge request agenda-libre/agenda-libre-ruby!19
This commit is contained in:
echarp 2018-11-08 20:58:03 +01:00
commit 8e8af51230

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()