Skip to content

Commit 2ddc7dc

Browse files
tfaughnanpbui
authored andcommitted
title: unescape html entities in youtube_title()
We already do this for Mastodon, Reddit, and generic titles.
1 parent df508e2 commit 2ddc7dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bobbit/modules/title.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async def youtube_title(bot, url, text):
9898
video_name = re.findall(r'<title[^>]*>([^<]+) - YouTube[\s]*</title>', text)[0] # get title, removing "- YouTube" from the end
9999
return bot.client.format_text(
100100
'{color}{green}Video{color}: {bold}{video_name}{bold} {color}{green}Channel{color}: {bold}{channel_name}{bold}',
101-
video_name = video_name.strip(),
101+
video_name = html.unescape(video_name.strip()),
102102
channel_name = channel_name.strip()
103103
)
104104
except IndexError:

0 commit comments

Comments
 (0)