From bf12b2d1f04f7971fa34857493f739cef0d7d11b Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 19 Mar 2016 20:06:58 +0000 Subject: [PATCH] move html_errors, tag href --- lib/php/page.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/php/page.php b/lib/php/page.php index a3aac561..af2d83f3 100644 --- a/lib/php/page.php +++ b/lib/php/page.php @@ -154,7 +154,12 @@ class Page extends nb { if (!is_array($content)) $content = array($content); $tags = array(); + foreach ($content as $c) { + + # Add missing href from content + if ($tag == 'a' and !preg_match('//',$attrs)) $attrs = trim($attrs.' href="'.$c.'"'); + $tags[] = '' . '<' . $tag . ($attrs ? " $attrs" : "") @@ -162,6 +167,7 @@ class Page extends nb { . $c . "" ; + } return join(NB_EOL,$tags); return '' @@ -192,7 +198,6 @@ class Page extends nb { */ function begin() { - if ($this->php_cli() or $this->p('txt_errors')) ini_set('html_errors', false); $this->headers(); if (preg_match('/html$/',$this->content_type)) { -- 2.47.3