Skip to content

Commit

Permalink
Quote game names in search URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
kra-mo committed Jul 10, 2024
1 parent d74c8ab commit 43a04e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cartridges/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import sys
from time import time
from typing import Any, Optional
from urllib.parse import quote

import gi

Expand Down Expand Up @@ -424,7 +425,7 @@ def on_remove_game_details_view_action(self, *_args: Any) -> None:
self.on_remove_game_action()

def search(self, uri: str) -> None:
Gio.AppInfo.launch_default_for_uri(f"{uri}{shared.win.active_game.name}")
Gio.AppInfo.launch_default_for_uri(f"{uri}{quote(shared.win.active_game.name)}")

def on_igdb_search_action(self, *_args: Any) -> None:
self.search("https://www.igdb.com/search?type=1&q=")
Expand Down

0 comments on commit 43a04e7

Please sign in to comment.