Skip to content

Commit f6dd66e

Browse files
committed
Fully encode URL parameters. Fixes #2
1 parent ce04e3a commit f6dd66e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mautrix_appservice/intent_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: future_fstrings -*-
2-
from urllib.parse import quote
2+
from urllib.parse import quote as urllib_quote
33
from time import time
44
from json.decoder import JSONDecodeError
55
from typing import Optional, Dict, Awaitable, List, Union, Tuple, Any
@@ -21,6 +21,10 @@
2121
from .errors import MatrixError, MatrixRequestError, MatrixResponseError, IntentError
2222

2323

24+
def quote(*args, **kwargs):
25+
return urllib_quote(*args, **kwargs, safe="")
26+
27+
2428
class HTTPAPI:
2529
def __init__(self, base_url: str, domain: str = None, bot_mxid: str = None, token: str = None,
2630
identity: str = None, log: Logger = None, state_store: StateStore = None,

0 commit comments

Comments
 (0)