From a0affb78c3536c02189f291549553bcb3ae7d76c Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Aleksandr Vityazev Date: Fri, 26 Nov 2021 16:14:43 +0300 Subject: [PATCH 06/11] * oauth2: Use rx with string-match-p. --- oauth2.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oauth2.el b/oauth2.el index f77ae6a..3dab614 100644 --- a/oauth2.el +++ b/oauth2.el @@ -75,7 +75,7 @@ uses to maintain state between the request and redirect response. Return the code provided by the service." (browse-url (concat auth-url - (if (string-match-p "\?" auth-url) "&" "?") + (if (string-match-p (rx "?") auth-url) "&" "?") "client_id=" (url-hexify-string client-id) "&response_type=code" "&redirect_uri=" (url-hexify-string redirect-uri) @@ -260,7 +260,7 @@ Return an `oauth2-token' structure." (defun oauth2-url-append-access-token (token url) "Append access TOKEN to URL." (concat url - (if (string-match-p "\?" url) "&" "?") + (if (string-match-p (rx "?") url) "&" "?") "access_token=" (oauth2-token-access-token token))) (defun oauth2-authz-bearer-header (token) -- 2.34.0