We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Paul,
I forget there is a way to call h(), j() etc without making use of
h()
j()
<?php use Aura\Html\Escaper as e; e::h('Hello World'); ?>
like adding a functions.php file and having something like
functions.php
<?php use Aura\Html\Escaper; function h($raw) { return Escaper::h($raw); }
And this can be autoloaded by composer.
And I would like to alter the getStatic() to make sure the Escaper object is there.
public static function getStatic() { if (! static::$escaper) { $html = new HtmlEscaper($this->flags, $this->encoding); $attr = new AttrEscaper($html, $this->encoding); $css = new CssEscaper($this->encoding); $js = new JsEscaper($this->encoding); static::$escaper = new self($html, $attr, $css, $js); } return static::$escaper; }
This make calling as h("Hello World") I guess 👍 .
h("Hello World")
Not sure whether you like or not.
The text was updated successfully, but these errors were encountered:
Hm. That looks like the functions are global, which is something I'd rather avoid. Bad enough to be using static methods.
Sorry, something went wrong.
No branches or pull requests
Hi Paul,
I forget there is a way to call
h(),j()etc without making use oflike adding a
functions.phpfile and having something likeAnd this can be autoloaded by composer.
And I would like to alter the getStatic() to make sure the Escaper object is there.
This make calling as
h("Hello World")I guess 👍 .Not sure whether you like or not.
The text was updated successfully, but these errors were encountered: