Browse Source

Tests: Import URLs surrounded by single quotes

This updates the regex for CSS URLs in the WPT import script to
correctly match URLs surrounded by single quotes.
Glenn Skrzypczak 3 weeks ago
parent
commit
3e56e9e65d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Meta/import-wpt-test.py

+ 1 - 1
Meta/import-wpt-test.py

@@ -52,7 +52,7 @@ class LinkedResourceFinder(HTMLParser):
     def __init__(self):
         super().__init__()
         self._tag_stack_ = []
-        self._match_css_url_ = re.compile(r"url\(\"?(?P<url>[^\")]+)\"?\)")
+        self._match_css_url_ = re.compile(r"url\(['\"]?(?P<url>[^'\")]+)['\"]?\)")
         self._match_css_import_string_ = re.compile(r"@import\s+\"(?P<url>[^\")]+)\"")
         self._resources = []