News for hackers. Stuff that matters.
Re:XMLUI by cluckindan on Sunday July 20, 2025 @01:42PM (#44627448)
If this doesn’t use a compiler, the ”when” feature looks like it will require 'unsafe-eval' and potentially 'unsafe-inline' to be enabled in content security policy, which will disable browser XSS protections. Not optimal for an easy-to-use component system intended for display of remote data.

Edit: I don’t see a CSP on the dogfooded homepage so I would assume this is an issue.

Re:XMLUI by btown on Sunday July 20, 2025 @04:20PM (#44628941)
Just ship https://github.com/NeilFraser/JS-Interpreter and you’re good to go! /s
Re:XMLUI by btown on Sunday July 20, 2025 @06:38PM (#44630032)
As a follow-up: Angular actually did this! https://docs.angularjs.org/guide/expression

> AngularJS does not use JavaScript's eval() to evaluate expressions. Instead AngularJS's $parse service processes these expressions.

Re:XMLUI by cluckindan on Monday July 21, 2025 @07:57AM (#44634155)
Note that those are the AngularJS aka ”Angular 1” docs.

For Angular as in ”Angular 2” docs, see https://angular.dev/guide/templates/expression-syntax

Re:XMLUI by cluckindan on Monday July 21, 2025 @01:35AM (#44632084)
Looks like they actually went this route, but implemented it from scratch.
Re:XMLUI by dotneteer on Monday July 21, 2025 @01:22AM (#44632016)
XMLUI does not execute JavaScript with "eval" or anything that would not comply with CSP. It runs interpreted JavaScript asynchronously in a sandbox and does not allow use of "eval" (and another dozen low-level functions, such as setTimeout).
Re:XMLUI by cluckindan on Monday July 21, 2025 @01:34AM (#44632077)
So the project has implemented a custom JavaScript parser and evaluator in TypeScript?
Re:XMLUI by cAtte_ on Monday July 21, 2025 @05:49PM (#44640807)
that is insane.