]> git.phdru.name Git - bookmarks_db.git/commitdiff
Fix(bkmk_robot_base): Decode base64 bytes to unicode
authorOleg Broytman <phd@phdru.name>
Sun, 11 Aug 2024 18:12:43 +0000 (21:12 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 15 Aug 2024 17:45:00 +0000 (20:45 +0300)
Robots/bkmk_robot_base.py

index bb90d8801d8cd47ec306bdd5541246da21cb593f..7c2e08d6c596918b874f5591e7cad95eb2d24024 100644 (file)
@@ -259,7 +259,8 @@ class robot_base(Robot):
                                     if not isinstance(icon_data, bytes):
                                         icon_data = icon_data.encode('latin1')
                                     bookmark.icon = "data:%s;base64,%s" \
-                                        % (content_type, b64encode(icon_data))
+                                        % (content_type,
+                                           b64encode(icon_data).decode('ascii'))
                                     icons[icon_url] = (content_type,
                                                        bookmark.icon
                                                        )