X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=htdocs%2Flib%2FContentProvider.class.php;h=cbfd7c332301c7ebd5b7d8d2463dd6b33536879f;hb=5a1b314c0a0ab8ed9be7b857c7996d8a3f87e7ed;hp=a32a37fb95d92a2593e5e730ca13b74b2dc4cfe9;hpb=394a07ff3e283f94c7ead44e8bd02d44c223314b;p=phpgitweb.git diff --git a/htdocs/lib/ContentProvider.class.php b/htdocs/lib/ContentProvider.class.php index a32a37f..cbfd7c3 100644 --- a/htdocs/lib/ContentProvider.class.php +++ b/htdocs/lib/ContentProvider.class.php @@ -112,7 +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('/([\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; }