diff --git a/outputhtml.php b/outputhtml.php index 6dc5b09..79b5f83 100644 --- a/outputhtml.php +++ b/outputhtml.php @@ -86,6 +86,9 @@ class outputhtml extends output EOT; } + // Get all the substitute zones + preg_match_all ("~({[\w_-]+})~", $layoutPage, $matches); + $zones = $matches[1]; // All the entries coming from views in array are substitute in layout // {content}, {title} @@ -106,7 +109,8 @@ EOT; $layoutPage = str_replace ($key, $val, $layoutPage); // Remove the not used {XXX} - $layoutPage = preg_replace ("~({[\w_-]+})~", "", $layoutPage); + foreach ($zones as $zone) + $layoutPage = str_replace ($zone, "", $layoutPage); //echo $layoutPage;exit; // Manage the timestamp/md5sum for the external files managed by this @@ -126,7 +130,7 @@ EOT; if (! empty ($errors)) { echo "ERROR: Invalid HTML provided\n"; - echo "
";var_dump ($errors);
+      echo "
"; print_r ($errors);
       foreach (explode ("\n", $layoutPage) as $key => $val)
       {
         echo sprintf ("%5d", $key+1)." ".htmlentities ($val)."\n";