forked from expo/troggle
utf8 edit pages
This commit is contained in:
@@ -283,7 +283,7 @@ def editexpopage(request, path):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
filepath = Path(settings.EXPOWEB) / path
|
filepath = Path(settings.EXPOWEB) / path
|
||||||
o = open(filepath, "r")
|
o = open(filepath.encode(sysdefaultencoding), "r")
|
||||||
html = o.read()
|
html = o.read()
|
||||||
autogeneratedmatch = re.search(r"\<\!--\s*(.*?(Do not edit|It is auto-generated).*?)\s*--\>", html, re.DOTALL + re.IGNORECASE)
|
autogeneratedmatch = re.search(r"\<\!--\s*(.*?(Do not edit|It is auto-generated).*?)\s*--\>", html, re.DOTALL + re.IGNORECASE)
|
||||||
if autogeneratedmatch:
|
if autogeneratedmatch:
|
||||||
|
|||||||
Reference in New Issue
Block a user