diff --git a/zin/core/h.class.php b/zin/core/h.class.php index 1b57303928..967a6a0db2 100644 --- a/zin/core/h.class.php +++ b/zin/core/h.class.php @@ -100,6 +100,13 @@ class h extends wg return new h(prop('tagName', $tagName), $args); } + public static function a() + { + $a = static::create('a', func_get_args()); + if($a->prop('target') === '_blank' && !$a->hasProp('rel')) $a->prop('rel', 'noopener noreferrer'); + return $a; + } + public static function button() { return static::create('button', prop('type', 'button'), func_get_args());