Skip to content

Check-Instruction, improved Escaping, improved Interpolation, Bugfixes

Compare
Choose a tag to compare
@TorbenKoehn TorbenKoehn released this 03 Feb 15:31
· 35 commits to master since this release

Added the ?-instruction ("unchecked"-operator)

Disables automatic isset()-checks on variables for certain cases (e.g. objects with __get, but without __isset)

Usage:

p?= $someVar
a(href?=$someVar)

It can be combined with the !-escaping-instruction

p?!= $someVar
a(href?!=$someVar)

Added !-instruction on texts to enable escaping

Sometimes you want to escape text, e.g. when you want to display the HTML, not let it render
For that all text-elements can now be prefixed with ! to enable escaping.

Escaped texts will still support interpolation.

Usage

h1 My example code
pre: code!.
    <?php
         $someVar = 123;
         echo $someVar;
    ?>

p! This HTML <em>here</em> will be escaped

p
    !| This text will also be escaped
  • Improved variable detection. Variables like $someVar["some, weird$9 key"] will also be automatically enclosed in the isset-check now
  • Fixed a bug with a trailing semicolon in variadics (#61)
  • Updated README-file to reflect latest config changes