eigent icon indicating copy to clipboard operation
eigent copied to clipboard

fix: resolve relative image paths in HTML files

Open 4pmtong opened this issue 10 months ago • 0 comments

Description

fix #826

  • Add HtmlRenderer component to handle relative image paths in HTML files
  • Convert relative image paths to absolute paths based on HTML file location
  • Load images as data URLs for proper rendering
  • Add DOMPurify for HTML sanitization
  • Preserve original img tag format (self-closing or not)

Fixes issue where images with relative paths (e.g., src="ticket_volume_by_area.png") in HTML files were not rendering correctly.

What is the purpose of this pull request?

  • [x] Bug fix
  • [ ] New Feature
  • [ ] Documentation update
  • [ ] Other

4pmtong avatar Jan 16 '26 14:01 4pmtong