mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
bytes need bytes
This commit is contained in:
parent
5506e99e9a
commit
5adbafb046
1 changed files with 2 additions and 2 deletions
|
@ -277,8 +277,8 @@ def truncate_chars(value, max_length):
|
|||
return value.decode('utf-8', 'ignore')
|
||||
|
||||
truncd_val = value[:max_length]
|
||||
if value[max_length] != " ":
|
||||
rightmost_space = truncd_val.rfind(" ")
|
||||
if value[max_length].decode() != " ":
|
||||
rightmost_space = truncd_val.rfind(b" ")
|
||||
if rightmost_space != -1:
|
||||
truncd_val = truncd_val[:rightmost_space]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue