Exactly this, wrap the comments in <pre> tags allowing patches or at least 
better build output formatting.

Greez
>From 28601ddddfb46b1d28904a81b043b39592836108 Mon Sep 17 00:00:00 2001
From: Manuel <[email protected]>
Date: Wed, 29 Jun 2011 22:31:22 +0200
Subject: [PATCH 3/3] Wrap comments in <pre> tags, fixes FS#14391


Signed-off-by: Manuel <[email protected]>
---
 web/html/css/arch.css         |    7 +++++++
 web/template/header.php       |    2 +-
 web/template/pkg_comments.php |    2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/web/html/css/arch.css b/web/html/css/arch.css
index eec02ee..e5b8319 100644
--- a/web/html/css/arch.css
+++ b/web/html/css/arch.css
@@ -7,6 +7,13 @@ body {
   font-family: "DejaVu Sans", sans-serif;
   font-size: 12px;
 }
+pre {
+  white-space: pre-wrap;       /* css-3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;      /* Opera 4-6 */
+  white-space: -o-pre-wrap;    /* Opera 7 */
+  word-wrap: break-word;       /* Internet Explorer 5.5+ */
+}
 /* Divs */
 #title {
   display: block;
diff --git a/web/template/header.php b/web/template/header.php
index 47ec909..0f9b335 100644
--- a/web/template/header.php
+++ b/web/template/header.php
@@ -51,7 +51,7 @@
 	reset($SUPPORTED_LANGS);
 	$select_lang = "<form method='get' action='".$_SERVER["PHP_SELF"]."'>\n";
 	if (isset($_REQUEST['ID'])) {
-		  $select_lang.= "<input type='hidden' name='ID' value='".$_REQUEST['ID']."'>\n";
+		$select_lang.= "<input type='hidden' name='ID' value='".$_REQUEST['ID']."'>\n";
 	}
 	$select_lang.= "<select name='setlang'>\n";
 	foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index aed9ca8..63a96eb 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -27,7 +27,7 @@ while (list($indx, $carr) = each($comments)) { ?>
 ?></div>
 	<blockquote class="comment-body">
 	<div>
-<?php echo parse_comment($carr['Comments']) ?>
+	<pre><?php parse_comment($carr['Comments']) ?></pre>
 	</div>
 	</blockquote>
 <?php
-- 
1.7.5.3

Reply via email to