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

Rendering textarea content needs to handle variable substitution differently #86

Closed bob2517 closed 3 years ago

bob2517 commented 3 years ago

When rendering contents for a textarea, variables do need to be substituted. But reactive variable updating and internal property assignment to nodes must not occur.

This has come about through working on the code editor and noticing that on one example there were temporary reactive variable placeholders in the ACSS edit textarea that shouldn't be in there. I can't think of any other place where this specific situation can occur.

bob2517 commented 3 years ago

The underlying problem is that in the code editor, variable output needs to be escaped. This should be a part of the $HTML_ESCAPED functionality. \{ ({) and \} (}) should cover it.

That will still leave double-curly reactive variable substitution potentially occurring in textareas through regular rendering, and this is not allowed. Sort that out first so that works as expected with no attempted node manipulation occurring in the textarea. It's not essential, but it would be nice. It's going to barf one way or the other anyway.

Then upgrade $HTML_ESCAPED as above. Or do that first. Thinking about it, the double-curly substitution barf is a valid fail anyway. For now just do $HTML_ESCAPED and re-open this if it comes up again.

But check escaped curlies render to real curlies on regular render as part of this.

bob2517 commented 3 years ago

Now on branch - closing.