Skip to content
Interface language: English
Audit / Signal

AI returns HTML or SVG: what runs when the file is opened?

HTML and SVG from AI can behave differently depending on where they are opened. Check format, external resources, preview and delivered version.

Article language: English

A person holds a red comb against a long dark braid beside a bright window.
In this article

“It's only a report,” says the author, sending an HTML file with a chart. When opened, however, the report requests a library from the internet, while the company logo comes from another server. The document has a surprisingly busy social life. Before it reaches a client, establish which connections it actually needs.

Consider a fictional company, Vela, using AI to prepare a summary of enquiries. The recipient needs to read approved figures and compare categories. They did not commission a new application. Yet the generated file may contain executable code, links and resources fetched when it is displayed. Acceptance must therefore cover both the information and the agreed way of opening it.

This is an operational review of the file's journey, not a claim to a complete code-security assessment. We do not run unfamiliar material on company data just to see whether it looks good. First establish the format, required behaviour and test environment. Only then decide what to give the recipient.

A file extension does not describe all its behaviour

HTML is a format for web documents. A report in that format may contain only text and styles, but it may also use scripts, code executed by the browser. SVG is a vector graphics format in which shapes and text are described. The word “image” alone is not enough to treat every way of opening it as a passive viewing operation.

MDN describes SVG used as an image: in this context, some browsers may restrict scripts or loading external resources. MDN distinguishes these image-context restrictions from directly opening SVG or embedding it as a document. That does not mean a script will always run in another context. A thumbnail preview therefore does not establish how the same file behaves when opened another way.

In the material's record, write what was created, which version is to be accepted and how it will be displayed. “Final report” is not a technical description. Establish whether the recipient gets a single HTML file, a package with additional files, a hosted-page link or an image exported from the chart. Each has a different delivery path and needs an appropriate test.

Separate the environment where the file is created from the place where its contents execute. An agent may have prepared a report in a restricted environment, while an employee later opens it in an ordinary browser. The first environment's boundaries do not automatically travel with the attachment. This is a different question from checking the agent's sandbox (in Polish), the restrictions on where the agent works.

Reading contents as text and displaying them in a browser are different actions too. The reviewer can first establish structure and dependencies without running an active preview. Identify who performs this step and with which approved tool. If the company lacks the ability to assess unfamiliar code, choosing a simpler, verified format may be an appropriate conclusion.

What must the report do, and what did the model merely add?

Vela needs a chart with values and a short commentary. Hovering over a bar may be convenient, but it should not be the only way to read the number. Before negotiating further permissions to execute code, establish whether interactivity is needed at all. Sometimes the model added it because it could, not because anyone needed it.

Request a dependency list: extra files, libraries, fonts, images, data and network addresses. For each, record its purpose and whether it is in the package or fetched externally. A list alone does not prove actual behaviour. It does enable comparison of the declared scope with observations in a controlled test.

In the fictional report, a library draws the bars, a font affects appearance and a data file supplies counts. These are three different dependencies. A missing font can change layout; missing data can change the report's meaning. If the data file remains at an external address and can change, a later opening need not show the version approved earlier. Decide whether the material should display a saved state or update when opened.

Included data is part of what is shared. A report may display only totals while the package contains a complete input file. The data owner should check everything delivered, not just the screen. Vela's category-count chart does not need individual customer histories. If the recipient does not need a file, remove it from the package and check again that the report works without that dependency.

Also distinguish an automatic fetch from a deliberate click. A report may contain a source link the recipient chooses to open. That differs from fetching a resource during page load. For an AI data-flow review (in Polish), the actual path of material and connections matters, not merely the visible links.

If someone says “one file, works offline”, test that exact version and condition. Do not substitute an image made earlier on the author's computer. In a prepared environment with network access cut off, record which elements remain available and which stop working. No visible error does not establish completeness: a blank chart area may raise no alarm, yet the report has lost information.

Aeneia conceptual photography

Test a copy delivered in the planned way. The author may have had an auxiliary file nearby that was omitted from the package, or access to a resource unavailable to the client. “It works for me” does not explain that difference. In a controlled place open the received package from the beginning, check names and locations of required files, and record a missing dependency. Do not repair it silently during acceptance, because the recipient would still receive incomplete material.

Also examine behaviour after a button press, tab change or expansion of details. Some resources are needed only later. The scope should follow the functions offered to the recipient. There is no need to click everything aimlessly; follow the agreed reading journey and check its significant effects.

The outcome can be simple: Vela chooses a static chart with visible values and commentary. In another case an interactive report is needed, but in a managed location with agreed dependencies. Either decision may fit the task. The problem would be delivering an active file under a description suggesting an ordinary image without agreeing its conditions of use.

The preview location is part of the result

Do not assume every panel labelled “preview” applies the same restrictions. A browser can embed another document in an iframe. MDN's iframe documentation explains that the sandbox attribute imposes restrictions and individual options lift them. The word sandbox in a product description does not itself reveal permitted behaviour.

With the person maintaining the preview, establish whether the document can run scripts, submit forms, open extra windows or initiate downloads. Permission for one function is not permission for the others. Configuration details need an owner and a recorded scope. This belongs to the appropriate technical implementer; give the business recipient a clear description of the approved opening path.

MDN also warns about granting both script execution and same-origin privileges when the embedded document and parent share protocol, host (the server name or address) and port. This is not a ready-made configuration for every system. The narrower acceptance conclusion is to assess restrictions for the particular embedding, then check that the version used conforms to the agreement. Changing preview options changes the test conditions.

Prepare test material with fictional figures. Direct any download checks only to controlled resources within the agreed scope. The test report should separate contents found in the file, observed behaviour and unchecked elements. Finding an address in the file does not prove a connection occurred; no connection during one opening does not establish behaviour on every path.

Record the environment, file version and actions performed. If a controlled preview blocks a function, the result concerns that preview. Do not add that the function does not exist in the file. Likewise, a correct image does not prove the content still matches its source. Execution and numerical checks can find different problems and need separate evidence.

Deliver the version that was actually accepted

A recipient may bypass the company preview and download the file. The acceptance record should therefore cover delivery too: an approved address, static export or agreed package. Do not send additional HTML alongside a checked image “just in case” if its use was not agreed. Add any extra attachment to the delivery list with its format and approved way of opening it.

Record the decision on further use: deliver the specified version in the agreed place, correct a particular dependency or hold use pending clarification. For a correction, record the condition for renewed acceptance. “Remove the external data file and include the approved totals” tells the implementer more than “increase security”. The team should know who confirms the change and which file is compared with the previous one. Add the version name and an unambiguous identifier of the accepted package. A second file titled “final report” does not inherit approval just because its author chose a similar name.

When exporting, check for loss of functions and information. If an HTML value was available only on hovering over a bar, a static image may omit it. Rewriting the report in another format therefore does not end acceptance. A similar issue occurs when handing over an AI-generated presentation (in Polish): compare the finished view with the content it was supposed to retain.

Preserve the accepted file's connection to its source, date and agreed use. Image provenance (in Polish) describes its journey but does not independently confirm the permitted effects of opening it. Even a file with a complete change history needs an assessment suited to its format and place of use.

Regenerating with AI creates another version to check. “No external resources” states the expected result; it does not confirm execution. Preserve the earlier package and list of dependencies found, and compare the new one on that basis. Then check whether removing a dependency also removed values or labels needed for reading. A behavioural fix must still retain the approved content.

If unexpected behaviour appears after delivery, pause the relevant sharing route and retain the facts needed to investigate. If it concerns an improper data flow, apply the agreed data-incident response (in Polish). Generating a corrected version alone does not explain what the recipient received earlier or what they actually did with the file.

At Aeneia Audit, such a review can start with one workflow and one representative package. For Vela the decision is an approved static report for reading, or a separately accepted interactive version in a specified location. The recipient then knows what they receive, and the author does not confuse successful opening on their own computer with acceptance of the whole material journey.

Aeneia / Aeneia editorial

Editorial article. Source links are included in the text.

About Aeneia

Brands we have worked with

  • L’Oréal
  • Garnier
  • Netflix
  • Carrefour
  • Warner Bros. Discovery
  • Biedronka
  • HBO Max
  • Wolt
  • Żabka
  • COSRX
  • Embassy of China in Poland
  • Mixa
Aeneia / Initium

From knowledge to a decision

Tell us what you want to put in order. We will agree on where to start.

Contact Aeneia

We partner with and use solutions from:

  • Google
  • OpenAI
  • Microsoft
  • Stripe
  • Anthropic
  • Linear