{% from "_macros.html" import icon %}
{% from "files/_macros.html" import size %}
{#
A file, drawn by its kind (services/file_ui.py). Everything in it is
untrusted -- a model or a device may have written the file -- so:
* Markdown is `services/markdown.py`'s output (markdown-it, then nh3): the
one path allowed to emit HTML, and the only `|safe` here.
* Code and text are escaped by Jinja; js/files.js highlights code in place
from its text (highlight.js reads `textContent`, never markup).
* HTML is never put into this page. It is the sealed frame: `sandbox`
without `allow-same-origin`, served from its own route under the sealed
policy (security/sealed.py), so it is an opaque origin with no network and
no way to reach this page, its cookie or the application.
Used as a page (files/view.html) and as the dialog a `show` card opens.
#}
{% include "files/_viewer_body.html" %}