X-Git-Url: http://git.pk910.de/?p=phpgitweb.git;a=blobdiff_plain;f=htdocs%2Flib%2FContentProvider.class.php;fp=htdocs%2Flib%2FContentProvider.class.php;h=cbfd7c332301c7ebd5b7d8d2463dd6b33536879f;hp=76b2eb0f1e1a508053a9df9d46d1c8048fbd703a;hb=5a1b314c0a0ab8ed9be7b857c7996d8a3f87e7ed;hpb=780b7fde2894a42749ac292fa3d180147afeff1a diff --git a/htdocs/lib/ContentProvider.class.php b/htdocs/lib/ContentProvider.class.php index 76b2eb0..cbfd7c3 100644 --- a/htdocs/lib/ContentProvider.class.php +++ b/htdocs/lib/ContentProvider.class.php @@ -112,8 +112,9 @@ class ContentProvider { else { $template_html = $this->load_template($this->template, $subtemplate); } - $template_html = preg_replace_callback('/%([^%]*)%/', array($this, "replace_placeholder"), $template_html); - $template_html = preg_replace_callback('/%([^%]*)%/', array($this, "replace_placeholder"), $template_html); + $template_html = preg_replace('/([\r\n]*)$/mD', '', $template_html); + $template_html = preg_replace_callback('/%([^%\n]*)%/', array($this, "replace_placeholder"), $template_html); + $template_html = preg_replace_callback('/%([^%\n]*)%/', array($this, "replace_placeholder"), $template_html); return $template_html; }