Improve content-renderer warnings to include post/author context
Problem
The content-renderer logs warnings when blocking content, but doesn't include context about which post triggered the warning:
[@hiveio/content-renderer]. | 2025-12-10T23:01:51.676Z [warn]: Blocked, image tag src does not appear to be a url; img
[@hiveio/content-renderer]. | 2025-12-10T23:07:08.014Z [warn]: Blocked, did not match iframe "src" white list urls:; iframe
This makes it impossible to:
- Debug which posts have broken content
- Identify patterns in blocked content
- Help users fix their posts
- Verify if legitimate content is being incorrectly blocked
Desired Output
[@hiveio/content-renderer]. | [warn]: Blocked image (invalid src) in @author/permlink: src="img"
[@hiveio/content-renderer]. | [warn]: Blocked iframe (not whitelisted) in @author/permlink: src="https://example.com/embed"
Tasks
-
Investigate how content-renderer is called in Denser -
Add post context (author/permlink) to renderer calls -
Update warning messages to include context -
Review iframe whitelist configuration -
Consider if whitelist needs updates
Related
-
@hiveio/content-rendererpackage - Content sanitization/security