diff --git a/domonic/dom.py b/domonic/dom.py index 92cd8c3..2da0b58 100644 --- a/domonic/dom.py +++ b/domonic/dom.py @@ -2208,7 +2208,7 @@ def getElements(context, tag): context = [] for fnd in found: if fnd.getAttribute("class") and re.search( - r"(^|\s)" + class_name + "(\s|$)", fnd.getAttribute("class") + r"(^|\s)" + class_name + r"(\s|$)", fnd.getAttribute("class") ): context.append(fnd)