Hi all,

> On Dec 24, 2025, at 02:14, Rob Landers <[email protected]> wrote:
> 
> Maybe, you should consider something like this:
> 
> <?:html: or <?:h:
> <?:attr:
> <?:url:
> <?:js:
> <?:css:
> 
> Then you only choose the one for your context:
> 
> const name = <?:js: $name ?>
> 
> <a href="/search?q=<?:attr: $query ?>"...
> 
> window.config=<?:js: $config ?>
> 
> .size { width=<?:css: $width ?>; } //prevents ;}.size:after { content="<a..."
> 
> Its a bit more to type, but compared to googling the right way to do these in 
> all the right places and vetting/hoping that it is right... it seems worth it.

For what it's worth, that is much how Qiq works:

- {{ ... }} will not echo at all by itself
- {{= ... }} will echo raw unescaped output
- {{h ... }} will echo escaped for HTML content
- {{a ... }} will echo escaped for HTML attributes
- {{u ... }} will echo escaped for URLs
- {{c ... }} will echo escaped for CSS
- {{j ... }} will echo escaped for JavaScript

<https://qiqphp.com/3.x/syntax.html>


-- pmj

Reply via email to