1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

Use webencodings to encode head_insert_str.

This commit is contained in:
Jack Cushman 2015-10-22 16:40:59 -04:00
parent 6035a9dc82
commit 633eb31f57
2 changed files with 4 additions and 2 deletions

View File

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

View File

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