Index: chrome/common/extensions/docs/server2/subversion_file_system.py |
diff --git a/chrome/common/extensions/docs/server2/subversion_file_system.py b/chrome/common/extensions/docs/server2/subversion_file_system.py |
index e9af0703aaa192084b0bdbb5b3c220d7f1eb6e80..bb131229b54bfb4d77914f4da198760aab872b65 100644 |
--- a/chrome/common/extensions/docs/server2/subversion_file_system.py |
+++ b/chrome/common/extensions/docs/server2/subversion_file_system.py |
@@ -2,6 +2,7 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import os |
import re |
import xml.dom.minidom as xml |
@@ -45,7 +46,13 @@ class _AsyncFetchFuture(object): |
elif path.endswith('/'): |
self._value[path] = self._ListDir(result.content) |
else: |
- self._value[path] = result.content |
+ if os.path.splitext(path)[-1] in ['.js', '.html', '.json']: |
not at google - send to devlin
2012/07/25 01:44:14
This is the same code as in LocalFileSystem. Pull
cduvall
2012/07/25 18:21:34
Done.
|
+ try: |
+ self._value[path] = unicode(result.content, 'utf-8') |
+ except: |
+ self._value[path] = unicode(result.content, 'latin-1') |
+ else: |
+ self._value[path] = result.content |
if self._error is not None: |
raise self._error |
return self._value |