diff --git a/web/custom_widgets/PlyrVideoPlayer.py b/web/custom_widgets/PlyrVideoPlayer.py index 761bac4..ede8b52 100644 --- a/web/custom_widgets/PlyrVideoPlayer.py +++ b/web/custom_widgets/PlyrVideoPlayer.py @@ -30,7 +30,7 @@ class PlyrVideoPlayer: ) with ui.element("div").classes("plyr-container"): - ui.html(video_html) + ui.html(video_html, sanitize=False) options = {} options.setdefault("settings", []) diff --git a/web/custom_widgets/content_card.py b/web/custom_widgets/content_card.py index 995d1be..5a6204c 100644 --- a/web/custom_widgets/content_card.py +++ b/web/custom_widgets/content_card.py @@ -26,11 +26,11 @@ class ContentCard: with self.poster_column: with ui.column(wrap=False).classes("w-full").style("gap: 0px; margin: 0; padding: 3px 3px 3px 10px;"): - ui.html(f"{self.content.title}").style("font-size: 16px") - ui.html(f"{self.content.og_title}").style("font-size: 10px") + ui.html(f"{self.content.title}", sanitize=False).style("font-size: 16px") + ui.html(f"{self.content.og_title}", sanitize=False).style("font-size: 10px") with ui.column(wrap=True).classes("w-full").style("gap: 0px; margin: 0; padding: 3px 3px 10px 10px"): - ui.html(f"{"
".join((self.content.genres))}
").style("font-size: 8px") + ui.html(f"{"
".join(self.content.genres)}
", sanitize=False).style("font-size: 8px") self.card.on("mouseover", self.on_card_hover) self.card.on("mouseleave", self.on_card_unhover) diff --git a/web/custom_widgets/content_dialog.py b/web/custom_widgets/content_dialog.py index 36fb7f3..1dc667f 100644 --- a/web/custom_widgets/content_dialog.py +++ b/web/custom_widgets/content_dialog.py @@ -23,9 +23,9 @@ class ContentDialog(ui.dialog): self.title_column.style("gap: 0; margin: 0; padding: 0;") with self.title_column: - ui.html(f"{self.content.title}").style("font-size: 22px") - ui.html(f"{self.content.og_title}").style("font-size: 14px") - ui.html(f"{", ".join(self.content.genres)}").style("font-size: 12px") + ui.html(f"{self.content.title}", sanitize=False).style("font-size: 22px") + ui.html(f"{self.content.og_title}", sanitize=False).style("font-size: 14px") + ui.html(f"{", ".join(self.content.genres)}", sanitize=False).style("font-size: 12px") with self.card: self.additional_info_column = ui.column(wrap=False) @@ -35,23 +35,23 @@ class ContentDialog(ui.dialog): with self.additional_info_column: release_date = self.content.release_date.split("-")[::-1] release_date = ".".join(release_date) - ui.html(f"Release Date: {release_date}").style("font-size: 12px") - ui.html(f"Average Score: {round(self.content.vote_average, 2)}").style("font-size: 12px") + ui.html(f"Release Date: {release_date}", sanitize=False).style("font-size: 12px") + ui.html(f"Average Score: {round(self.content.vote_average, 2)}", sanitize=False).style("font-size: 12px") if self.content.type == "movie": budget = "$" + f"{self.content.budget:_}".replace("_", ".") - ui.html(f"Budget: {budget}").style("font-size: 12px") - ui.html(f"Runtime: {convert_runtime(self.content.runtime)}").style("font-size: 12px") + ui.html(f"Budget: {budget}", sanitize=False).style("font-size: 12px") + ui.html(f"Runtime: {convert_runtime(self.content.runtime)}", sanitize=False).style("font-size: 12px") elif self.content.type == "tv": - ui.html(f"Number of Seasons: {self.content.number_of_seasons}").style("font-size: 12px") - ui.html(f"Number of Episodes: {self.content.number_of_episodes}").style("font-size: 12px") + ui.html(f"Number of Seasons: {self.content.number_of_seasons}", sanitize=False).style("font-size: 12px") + ui.html(f"Number of Episodes: {self.content.number_of_episodes}", sanitize=False).style("font-size: 12px") total_runtime = sum([ep.runtime for ep in itertools.chain.from_iterable([s.episodes for s in self.content.seasons])]) - ui.html(f"Total Runtime: {convert_runtime(total_runtime)}").style("font-size: 12px") + ui.html(f"Total Runtime: {convert_runtime(total_runtime)}", sanitize=False).style("font-size: 12px") if self.content.in_production: - ui.html("Currently in production").style("font-size: 12px") + ui.html("Currently in production", sanitize=False).style("font-size: 12px") else: - ui.html("Finished").style("font-size: 12px") + ui.html("Finished", sanitize=False).style("font-size: 12px") with self.card, ui.row(wrap=False).classes("w-full").style("display: flex; justify-content: center;"): ui.button("Create Room").on_click(self.create_room).props("rounded push") diff --git a/web/custom_widgets/header.py b/web/custom_widgets/header.py index 62f1c92..e4f12a2 100644 --- a/web/custom_widgets/header.py +++ b/web/custom_widgets/header.py @@ -12,5 +12,5 @@ async def draw_header(): with ui.row(wrap=False).classes("items-center"): if user := await check_user(): - ui.html(f"{user.username}") + ui.html(f"{user.username}", sanitize=False) ui.button(icon="logout", on_click=lambda: logout(redirect=True)).props("rounded") diff --git a/web/pages/all_rooms.py b/web/pages/all_rooms.py index cbe8cfd..615d161 100644 --- a/web/pages/all_rooms.py +++ b/web/pages/all_rooms.py @@ -36,8 +36,8 @@ async def page(): ui.image(content.poster_url).style("width: 100px; border-radius: 15px") with ui.column(wrap=False).style("gap: 0px;"): - ui.html(f"{room.uid}") - ui.html(f"{content.title}") + ui.html(f"{room.uid}", sanitize=False) + ui.html(f"{content.title}", sanitize=False) users = [globals.USERS_DATABASE.by_uid[uid] for uid in room.connected_users] - ui.html(f"{", ".join(u.username for u in users)}") + ui.html(f"{", ".join(u.username for u in users)}", sanitize=False)