We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b38129 commit 868f046Copy full SHA for 868f046
lazy_srcset/templatetags/lazy_srcset.py
@@ -50,8 +50,8 @@ def get_svg_dimensions(svg_file):
50
pass
51
52
# These could include units E.g. px or pt so strip them out.
53
- width = re.sub("\\D", "", width) if width is not None else None
54
- height = re.sub("\\D", "", height) if height is not None else None
+ width = re.sub(r"[^\d.]", "", width) if width is not None else None
+ height = re.sub(r"[^\d.]", "", height) if height is not None else None
55
56
return width, height
57
0 commit comments