Skip to content

Commit

Permalink
title: unescape html entities in youtube_title()
Browse files Browse the repository at this point in the history
We already do this for Mastodon, Reddit, and generic titles.
  • Loading branch information
tfaughnan authored and pbui committed Apr 24, 2024
1 parent ccec8cd commit 5c9fbe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bobbit/modules/title.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def youtube_title(bot, url, text):
video_name = re.findall(r'<title[^>]*>([^<]+) - YouTube[\s]*</title>', text)[0] # get title, removing "- YouTube" from the end
return bot.client.format_text(
'{color}{green}Video{color}: {bold}{video_name}{bold} {color}{green}Channel{color}: {bold}{channel_name}{bold}',
video_name = video_name.strip(),
video_name = html.unescape(video_name.strip()),
channel_name = channel_name.strip()
)
except IndexError:
Expand Down

0 comments on commit 5c9fbe5

Please sign in to comment.