Explorar el Código

HUE-121. Proper UTF-8 support for help pages

Alex Newman hace 15 años
padre
commit
e357d41e94
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      apps/help/src/help/views.py

+ 2 - 1
apps/help/src/help/views.py

@@ -62,8 +62,9 @@ def view(request, app, path):
 
   if not fs.isfile(path):
     raise PopupException("Could not find or read the file: %s (app %s)" % (path, app))
-  
+
   content = fs.open(path, 'r').read()
+  content = unicode(content, 'utf-8', errors='replace')
   if path.lower().endswith(".md"):
     content = ('<div class="rendered-markdown">' +
                markdown.markdown(content, ['extra']) +