mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Removing breaking text importer UTF-8 encoding.
This commit is contained in:
parent
bd89eaa34f
commit
c476d89e1f
1 changed files with 5 additions and 5 deletions
|
@ -65,11 +65,11 @@ class TextImporter:
|
|||
# if self.debug:
|
||||
# logging.user(self.request, "~FBOriginal text's website: %s" % text)
|
||||
|
||||
if resp.encoding and resp.encoding != 'utf-8':
|
||||
try:
|
||||
text = text.encode(resp.encoding)
|
||||
except (LookupError, UnicodeEncodeError):
|
||||
pass
|
||||
# if resp.encoding and resp.encoding != 'utf-8':
|
||||
# try:
|
||||
# text = text.encode(resp.encoding)
|
||||
# except (LookupError, UnicodeEncodeError):
|
||||
# pass
|
||||
|
||||
if text:
|
||||
text = text.replace("\xc2\xa0", " ") # Non-breaking space, is mangled when encoding is not utf-8
|
||||
|
|
Loading…
Add table
Reference in a new issue