You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, the 'sanitize' function would throw an error when 'text' was None. This commit fixes the issue by adding a check to handle the case where 'text' is None, returning an empty string instead.
Closes#568
The RSS feed endpoints gives a server error 500.
linkding | 2023-11-03 13:16:06,794 ERROR Internal Server Error: /feeds/some_id/unread
linkding | Traceback (most recent call last):
linkding | File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
linkding | response = get_response(request)
linkding | File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
linkding | response = wrapped_callback(request, *callback_args, **callback_kwargs)
linkding | File "/opt/venv/lib/python3.10/site-packages/django/contrib/syndication/views.py", line 40, in call
linkding | feedgen = self.get_feed(obj, request)
linkding | File "/opt/venv/lib/python3.10/site-packages/django/contrib/syndication/views.py", line 191, in get_feed
linkding | description = self._get_dynamic_attr("item_description", item)
linkding | File "/opt/venv/lib/python3.10/site-packages/django/contrib/syndication/views.py", line 103, in _get_dynamic_attr
linkding | return attr(obj)
linkding | File "/etc/linkding/./bookmarks/feeds.py", line 35, in item_description
linkding | return sanitize(item.resolved_description)
linkding | File "/etc/linkding/./bookmarks/feeds.py", line 21, in sanitize
linkding | return ''.join(ch for ch in text if ch in valid_chars or unicodedata.category(ch)[0] != 'C')
linkding | TypeError: 'NoneType' object is not iterable
linkding | [pid: 17|app: 0|req: 303/464] 171.18.0.30 () {68 vars in 1335 bytes} [Fri Nov 3 13:16:06 2023] GET /feeds/some_id/unread => generated 145 bytes in 66 msecs (HTTP/1.1 500) 8 headers in 282 bytes (1 switches on core 1)
I think is related to #565
The text was updated successfully, but these errors were encountered: