Commits

David Larlet  committed 0b7a7ac

Deal with local images' rendering, refs #5

  • Participants
  • Parent commits b7d6098

Comments (0)

Files changed (1)

File src/browser.py

         # with base URL and prepend the proxy to all URLs (but images)
         html = document._html()
         for element, attribute, link, position in html.iterlinks():
-            if attribute == "src":  # Do not modify images
-                continue
+            # Deal with relative links
             link = link.strip()
             if link.startswith("/"):
                 link = base_url + link
-            element.attrib[attribute] = self.__prepend_proxy_url(link)
+
+            # In case of an image, do not proxy the src URL
+            if attribute == "src":
+                element.attrib[attribute] = link
+            else:
+                element.attrib[attribute] = self.__prepend_proxy_url(link)
         document.html = html
 
         # The short title is more concise and readable