diff --git a/custom-css.php b/custom-css.php
index b8821c5ab2d46d9b32d4c6dcc14f0dd7cbea2a07..a1eb727fca9ad62ef0082678cc6f555e21fe144f 100644
--- a/custom-css.php
+++ b/custom-css.php
@@ -45,8 +45,8 @@ function ai_safecss_class() {
         public function subvalue() {
             $this->sub_value = trim($this->sub_value);
 
-            if (preg_match('!^\s*(?P<url_expression>url\s*(?P<opening_paren>\(|\\0028)(?P<parenthetical_content>.*)(?P<closing_paren>\)|\\0029))(.*)$!Dis', $safecss->sub_value, $matches)) {
-                $this->sub_value = ai_sanitize_urls_in_css_properties($matches['parenthetical_content'], $safecss->property);
+            if (preg_match('!^\s*(?P<url_expression>url\s*(?P<opening_paren>\(|\\0028)(?P<parenthetical_content>.*)(?P<closing_paren>\)|\\0029))(.*)$!Dis', $this->sub_value, $matches)) {
+                $this->sub_value = ai_sanitize_urls_in_css_properties($matches['parenthetical_content'], $this->property);
 
                 // Only replace the url([...]) portion of the sub_value so we don't
                 // lose things like trailing commas or !important declarations.