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

Disappearing backslash issue when placing variable into an input field #147

Closed bob2517 closed 3 years ago

bob2517 commented 3 years ago

This is fixed offline - will commit shortly.

It was an issue to do with the way variables are handled in the core and how they are rendered. I've just spent the weekend sorting it out so that any type of variable escaping is now only ever done at the point of render, and sorted out this issue of the disappearing backslash. It was a little bit confusing before, as escaping was done in different places. But the simplicity I came to realise was that we only need escaping, html or otherwise, at the point of render. So moving that has simplified things somewhat I think.

This was necessary in 2.5.1 through implementing the html-entity-decode options for the set-attribute & set-property commands, when it became obvious doing the tests that things were not working as you would expect.

bob2517 commented 3 years ago

This fixes the todo example without any changes needed to anything, and the docs website still all works as well. So I'm calling this a backward compatible fix, so that's cool.

bob2517 commented 3 years ago

Now on branch, closing.