|
|
@ -58,10 +58,12 @@ def SaveUploadCssFile(editorform, newcssfolder): |
|
|
|
cssfile = editorform.cssfile.data |
|
|
|
cssfilename = f"{secure_filename(editorform.cssname.data)}.css" |
|
|
|
cssfile.save(os.path.join(newcssfolder, cssfilename)) |
|
|
|
openfile = open(os.path.join(newcssfolder, cssfilename), 'r+') |
|
|
|
openfile = open(os.path.join(newcssfolder, cssfilename), 'r') |
|
|
|
cleancss = bleach.clean(openfile.read()) |
|
|
|
openfile.write(cleancss) |
|
|
|
openfile.close |
|
|
|
openfile.close() |
|
|
|
cleanfile = open(os.path.join(newcssfolder, cssfilename), 'w') |
|
|
|
cleanfile.write(cleancss) |
|
|
|
cleanfile.close() |
|
|
|
|
|
|
|
|
|
|
|
def WriteCssToFile(editorform, newcssfolder): |
|
|
|