Revision: 1080
http://mrbs.svn.sourceforge.net/mrbs/?rev=1080&view=rev
Author: cimorrison
Date: 2009-04-01 12:47:44 +0000 (Wed, 01 Apr 2009)
Log Message:
-----------
Changed calls to nl2br() to use a config file constant IS_XHTML set to FALSE.
Without that XHTML style <br /> tags were being produced causing validation
warnings.
Modified Paths:
--------------
mrbs/trunk/web/config.inc.php
mrbs/trunk/web/report.php
mrbs/trunk/web/view_entry.php
Modified: mrbs/trunk/web/config.inc.php
===================================================================
--- mrbs/trunk/web/config.inc.php 2009-03-31 20:25:12 UTC (rev 1079)
+++ mrbs/trunk/web/config.inc.php 2009-04-01 12:47:44 UTC (rev 1080)
@@ -89,7 +89,15 @@
$theme = "default";
+/*********
+ * DOCTYPE
+ ********/
+ // Records which DOCTYPE is being used. Do not change - it will not change
the DOCTYPE
+ // that is used; it is merely used when the code needs to know the DOCTYPE,
for example
+ // in calls to nl2br. TRUE means XHTML, FALSE means HTML.
+ define("IS_XHTML", FALSE);
+
/*******************
* Calendar settings
*******************/
Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php 2009-03-31 20:25:12 UTC (rev 1079)
+++ mrbs/trunk/web/report.php 2009-04-01 12:47:44 UTC (rev 1080)
@@ -172,7 +172,7 @@
// Description:
echo "<tr><td>" . get_vocab("description") . ":</td><td>" .
- nl2br(htmlspecialchars($row['description'])) . "</td></tr>\n";
+ nl2br(htmlspecialchars($row['description']), IS_XHTML) . "</td></tr>\n";
// Entry Type:
$et = empty($typel[$row['type']]) ? "?".$row['type']."?" :
$typel[$row['type']];
Modified: mrbs/trunk/web/view_entry.php
===================================================================
--- mrbs/trunk/web/view_entry.php 2009-03-31 20:25:12 UTC (rev 1079)
+++ mrbs/trunk/web/view_entry.php 2009-04-01 12:47:44 UTC (rev 1080)
@@ -239,11 +239,11 @@
<table id="entry">
<tr>
<td><?php echo get_vocab("description") ?>:</td>
- <td><?php echo nl2br($description) ?></td>
+ <td><?php echo nl2br($description, IS_XHTML) ?></td>
</tr>
<tr>
<td><?php echo get_vocab("room") ?>:</td>
- <td><?php echo nl2br($area_name . " - " . $room_name) ?></td>
+ <td><?php echo nl2br($area_name . " - " . $room_name, IS_XHTML) ?></td>
</tr>
<tr>
<td><?php echo get_vocab("start_date") ?>:</td>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits