From 63fcdd2b07be369efec8bc89771f52cd669c94ea Mon Sep 17 00:00:00 2001 From: blackfalcon Date: Feb 29 2020 19:29:34 +0000 Subject: Fix html unescaped urls --- diff --git a/src/FedoraReview/url_bug.py b/src/FedoraReview/url_bug.py index dacdee3..617ba4d 100644 --- a/src/FedoraReview/url_bug.py +++ b/src/FedoraReview/url_bug.py @@ -19,6 +19,7 @@ No xmlrpc involved, for better or worse. """ import os.path from six.moves.urllib.request import urlretrieve +from six.moves.urllib.parse import unquote from bs4 import BeautifulSoup @@ -64,13 +65,13 @@ class UrlBug(AbstractBug): urls = self._find_urls_by_ending(".src.rpm") if not urls: raise self.BugError("Cannot find source rpm URL") - self.srpm_url = urls[0] + self.srpm_url = unquote(urls[0]) def find_spec_url(self): urls = self._find_urls_by_ending(".spec") if not urls: raise self.BugError("Cannot find spec file URL") - self.spec_url = urls[0] + self.spec_url = unquote(urls[0]) def get_location(self): return self.bug_url