Fix html_filter.py for html_sanitizer 1.7.3
This commit is contained in:
parent
6cc689fb57
commit
19cbfc9cfe
5
TODO.md
5
TODO.md
|
@ -11,6 +11,7 @@
|
||||||
- When qml syntax highlighting supports ES6 string interpolation, use them
|
- When qml syntax highlighting supports ES6 string interpolation, use them
|
||||||
|
|
||||||
- Fixes
|
- Fixes
|
||||||
|
- Greentext for local echo
|
||||||
- Show error if uploading avatar fails
|
- Show error if uploading avatar fails
|
||||||
|
|
||||||
- Don't strip user spacing in html
|
- Don't strip user spacing in html
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
- Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb`
|
- Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb`
|
||||||
|
|
||||||
- UI
|
- UI
|
||||||
|
- Reduce icons brightness
|
||||||
- Restore previous focus after closing right click context menu
|
- Restore previous focus after closing right click context menu
|
||||||
- Choose a better default easing type for animations
|
- Choose a better default easing type for animations
|
||||||
- Make HListView scrollbars visible
|
- Make HListView scrollbars visible
|
||||||
|
@ -113,6 +115,9 @@
|
||||||
- Links preview
|
- Links preview
|
||||||
|
|
||||||
- Client improvements
|
- Client improvements
|
||||||
|
- Prevent starting multiple instances, causes problems with E2E DB
|
||||||
|
(sending new messages from second instances makes them undecryptable to
|
||||||
|
first instance until it's restarted)
|
||||||
- `translated` arg for avatar upload and login errors
|
- `translated` arg for avatar upload and login errors
|
||||||
- Check if username exists on login screen
|
- Check if username exists on login screen
|
||||||
- `pyotherside.atexit()`
|
- `pyotherside.atexit()`
|
||||||
|
|
|
@ -26,8 +26,9 @@ class HtmlFilter:
|
||||||
self._inline_sanitizer = Sanitizer(self.sanitize_settings(inline=True))
|
self._inline_sanitizer = Sanitizer(self.sanitize_settings(inline=True))
|
||||||
|
|
||||||
# The whitespace remover doesn't take <pre> into account
|
# The whitespace remover doesn't take <pre> into account
|
||||||
sanitizer.normalize_overall_whitespace = lambda html: html
|
sanitizer.normalize_overall_whitespace = lambda html, *args, **kw: html
|
||||||
sanitizer.normalize_whitespace_in_text_or_tail = lambda el: el
|
sanitizer.normalize_whitespace_in_text_or_tail = \
|
||||||
|
lambda el, *args, **kw: el
|
||||||
|
|
||||||
# hard_wrap: convert all \n to <br> without required two spaces
|
# hard_wrap: convert all \n to <br> without required two spaces
|
||||||
self._markdown_to_html = mistune.Markdown(
|
self._markdown_to_html = mistune.Markdown(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user