Active-CSS / active-css

The epic event-driven browser language for UI with functionality in one-liner CSS. Over 100 incredible CSS commands for DOM manipulation, ajax, reactive variables, single-page application routing, and lots more. Could CSS be the JavaScript framework of the future?
https://activecss.org
Other
42 stars 7 forks source link

Allow ajax json from un-managed server to render html #259

Closed bob2517-whiteline closed 1 year ago

bob2517-whiteline commented 2 years ago

Currently in ACSS, JSON containing HTML needs to be placed in a JSON key prefixed with a dollar.

$myHTML: "<p>Hi</p>"

I've just run into a situation where I'm using a 3rd-party API which unsurprisingly doesn't have a dollar.

Workaround: I could iterate the JSON results on the server and recreate the JSON object and put a dollar before each HTML string. That doesn't particularly make much sense.

Or I could just let ACSS check if the dollar is there on the JSON string or not. The security aspect would be that the dollar would definitely be needed in ACSS, but not essential in the JSON string. In other words, it will work with or without the dollar in the imported JSON, but it requires the dollar in ACSS.

I've just done a quick fix for this and will put it on the branch when I get the chance.

bob2517 commented 1 year ago

Closing in preparation for release.