mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00

PostgreSQL 12 adds SVG images in the documentation, so the website should be able to display them. The images themselves were already loaded by the docsloader, but the regexps in the URL would block them from being seen. Fix this by creating a separate function for the SVGs, since we also don't want to render them inside teh templates. This new view must also be tagged with @allow_frames, since the browser considers the <object> tag used to be a subframe. Without this, they would be blocked from viewing even on our own site.