From 384a2fe8b70a62818d56eae114fd15da54f36f72 Mon Sep 17 00:00:00 2001
From: Jim Miller
Date: Wed, 14 Jan 2026 13:18:51 -0600
Subject: [PATCH] CSS url() style attr--don't do when tag is empty.
---
fanficfare/adapters/base_adapter.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fanficfare/adapters/base_adapter.py b/fanficfare/adapters/base_adapter.py
index 7d641e89..4bd581ca 100644
--- a/fanficfare/adapters/base_adapter.py
+++ b/fanficfare/adapters/base_adapter.py
@@ -779,7 +779,11 @@ try to download.
logger.info("Parsing for img tags failed--probably poor input HTML. Skipping img(%s)"%img)
## Inline CSS url() images
for inline in soup.select('*[style]'):
- inline['style'] = self.include_css_urls(url,inline['style'])
+ # Only if there's something in that tag. mostly for
+ # empty where media embed failed on XF
+ # sites. Prevents including unseeable images.
+ if stripHTML(inline):
+ inline['style'] = self.include_css_urls(url,inline['style'])
## Embedded CSS