mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-01-22 17:01:18 +01:00
Fix HTML entity decoding when editing Mastodon posts (#893)
This commit is contained in:
@@ -4,6 +4,8 @@ TWBlue Changelog
|
||||
|
||||
* Core:
|
||||
* Expanded the keystroke editor actions list. Now, many previously hidden or unassignable actions are available to be mapped to custom keyboard shortcuts.
|
||||
* Mastodon:
|
||||
* Fixed an issue where HTML entities were not decoded when editing a post. ([#893](https://github.com/mcv-software/twblue/issues/893))
|
||||
|
||||
## Changes in version 2026.01.13
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import languageHandler
|
||||
from twitter_text import parse_tweet, config
|
||||
from mastodon import MastodonError
|
||||
from controller import messages
|
||||
from sessions.mastodon import templates
|
||||
from sessions.mastodon import templates, utils
|
||||
from wxUI.dialogs.mastodon import postDialogs
|
||||
from extra.autocompletionUsers import completion
|
||||
from . import userList
|
||||
@@ -282,10 +282,7 @@ class editPost(post):
|
||||
# Extract text from post
|
||||
if item.reblog != None:
|
||||
item = item.reblog
|
||||
text = item.content
|
||||
# Remove HTML tags from content
|
||||
import re
|
||||
text = re.sub('<[^<]+?>', '', text)
|
||||
text = utils.html_filter(item.content)
|
||||
# Initialize parent class
|
||||
super(editPost, self).__init__(session, title, caption, text=text, *args, **kwargs)
|
||||
# Store the post ID for editing
|
||||
|
||||
Reference in New Issue
Block a user