1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-24 06:59:52 +01:00

Merge pull request #139 from jcushman/webencodings

Use webencodings to encode head_insert_str.
This commit is contained in:
Ilya Kreymer 2015-10-22 16:23:47 -07:00
commit c003a96618
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
#import chardet #import chardet
import pkgutil import pkgutil
import webencodings
import yaml import yaml
import re import re
@ -164,7 +165,7 @@ class RewriteContent:
if charset: if charset:
try: try:
head_insert_str = head_insert_orig.encode(charset) head_insert_str = webencodings.encode(head_insert_orig, charset)
except: except:
pass pass

View File

@ -76,7 +76,8 @@ setup(
'jinja2', 'jinja2',
'surt', 'surt',
'pyyaml', 'pyyaml',
'watchdog' 'watchdog',
'webencodings',
], ],
tests_require=[ tests_require=[
'pytest', 'pytest',