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 May 13, 2024
1 parent df508e2 commit 2ddc7dc
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 2ddc7dc

Please sign in to comment.