- 4 minutes to read

StylesheetScriptsEnabled - System Parameter

StylesheetScriptsEnabled decides whether a Stylesheet's own browser script runs where the Web Client shows its output: script tags, event handlers such as onerror and onclick, and javascript: links, in XSLT and Liquid alike, also when they come from the logged message.

At a Glance

Property Value
Key StylesheetScriptsEnabled
Data type boolean
Default false (scripts don't run) on a new installation; an upgrade keeps the current value
Read by Web Client only
Takes effect Within about 45 seconds; no restart needed
Status ✅ Active
Since Nodinite 7

How It Works

StylesheetScriptsEnabled set to false and saved; in a Log View the EDIFACT invoice formatted by the Line break an EDIFACT example stays empty; set to true and saved; formatted again, the invoice shows one segment per line, animated walkthrough (7.12)
Animated walkthrough: with false the Line break an EDIFACT Stylesheet loses its script, and the formatted invoice stays empty. With true the script runs, isolated from the Web Client, and the invoice shows one segment per line. The value was put back afterwards.

Stylesheets format message bodies in Log Views: the View message body formatted as dialog, the Stylesheet editor preview, and Open in New Window. New 7.12 That output always runs in a frame with an origin of its own. Its script, when allowed, can't read the Web Client's window, cookies, storage, or API answers. Charts, Mermaid diagrams, forms, links that open new tabs, downloads, and Print keep working, and so do images from the Image Library and icons.

Value Behaviour
false (default on a new installation) ❌ No script from a Stylesheet runs: no script tags, no event handlers, no javascript: links. Mermaid diagrams still draw, because Nodinite's own page scripts run. Chart.js charts don't, because they need the Stylesheet's own script. Liquid templates lose their script blocks before rendering, as always.
true ✅ The Stylesheet's scripts run, isolated from the Web Client as described above. A script error inside a library such as Chart.js shows only as Script error., without details.

The Logging Service and the Monitoring Service don't read this parameter, and alert e-mails sent through Alarm Plugins never run browser script.

The Line break an EDIFACT and Base64Decode XML from JSON examples contain JavaScript and need this parameter set to true.

Important

New 7.12 A new installation sets StylesheetScriptsEnabled to false. An upgrade keeps the value it already has, and installations before 7.12 were set up with true. After an upgrade, check the value, and set it to false unless a Stylesheet needs scripts.

msxsl:script Never Runs

msxsl:script blocks in XSLT Stylesheets never run in Nodinite 7, whatever the value of this parameter, because .NET can't compile them. A Stylesheet with an unused block works. A Stylesheet that calls a script function shows this message instead of the formatted body:

The View message body formatted as dialog with the message that the Stylesheet calls an msxsl:script and scripts in XSLT Stylesheets can't run in Nodinite 7 (7.12)
A Stylesheet that calls an msxsl:script function: use the built-in functions instead, or remove the script.

Rewrite such a Stylesheet with standard XSLT functions. For example, format a date with substring and concat instead of a C# DateTime script:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <result>
      <formatted-date>
        <!-- 2026-11-09T15:43:22 becomes 2026-11-09 15:43:22 -->
        <xsl:value-of select="concat(substring(/data/timestamp, 1, 10), ' ', substring(/data/timestamp, 12, 8))"/>
      </formatted-date>
    </result>
  </xsl:template>
</xsl:stylesheet>

Choosing a Value

  • For security, keep the default false unless a Stylesheet really needs browser script, for example for Chart.js charts.
  • Before you set it to false, review your Stylesheets for scripts. Their output still shows, without the parts the scripts draw.
  • Scripts run isolated, but they still run in the reader's browser. Review who is a member of the Administrator Role, and review new Stylesheets before you use them.

Next Steps