extended _who_regexp to accept ' and ", else it doesn't match always.
authorCYBERDEViLNL <CYBERDEViLNL@github.com>
Tue, 10 Apr 2018 20:49:07 +0000 (22:49 +0200)
committerCYBERDEViLNL <CYBERDEViLNL@github.com>
Tue, 10 Apr 2018 20:49:07 +0000 (22:49 +0200)
diaspy/models.py

index 64303e3fb172d99cf02625c7ab8e57b37320a4ac..78c721a7d15ca4228d7123898f2e7c353679d94d 100644 (file)
@@ -93,7 +93,7 @@ class Aspect():
 class Notification():
     """This class represents single notification.
     """
-    _who_regexp = re.compile(r'/people/[0-9a-f]+" class=\'hovercardable')
+    _who_regexp = re.compile(r'/people/[0-9a-f]+["\']{1} class=["\']{1}hovercardable')
     _when_regexp = re.compile(r'[0-9]{4,4}(-[0-9]{2,2}){2,2} [0-9]{2,2}(:[0-9]{2,2}){2,2} UTC')
     _aboutid_regexp = re.compile(r'/posts/[0-9a-f]+')
     _htmltag_regexp = re.compile('</?[a-z]+( *[a-z_-]+=["\'].*?["\'])* */?>')