View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0011927 | mantisbt | html | public | 2010-05-14 01:12 | 2014-12-08 02:08 |
| Reporter | dhx | Assigned To | dhx | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.3.0dev | ||||
| Target Version | 1.3.0-beta.1 | ||||
| Summary | 0011927: html_status_legend has code paths that forget to print closing table tags | ||||
| Description | The html_status_legend function in html_api.php first prints opening table tags such as <table>. There are then code paths within the function that return without adding the closing </table> etc tags to the table. This causes rendering problems in browsers as the output HTML can be invalid. Thanks to Kirill for reporting this issue. | ||||
| Tags | patch | ||||
| Attached Files | incorrect_table.patch (1,173 bytes)
From e53d340983edae41565e70bc629a30e7e8c532be Mon Sep 17 00:00:00 2001
From: Kirill Krasnov <krasnovforum@gmail.com>
Date: Thu, 13 May 2010 10:16:07 +0300
Subject: [PATCH] Fix incorrect structure table if one of checks return true
---
core/html_api.php | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/html_api.php b/core/html_api.php
index ab52334..5b7bf55 100644
--- a/core/html_api.php
+++ b/core/html_api.php
@@ -1273,10 +1273,6 @@ function print_summary_menu( $p_page = '' ) {
* @return null
*/
function html_status_legend() {
- echo '<br />';
- echo '<table class="status-legend width100" cellspacing="1">';
- echo '<tr>';
-
# Don't show the legend if only one status is selected by the current filter
$t_current_filter = current_user_get_bug_filter();
if ( $t_current_filter === false ) {
@@ -1327,6 +1323,10 @@ function html_status_legend() {
return null;
}
+ echo '<br />';
+ echo '<table class="status-legend width100" cellspacing="1">';
+ echo '<tr>';
+
# draw the status bar
$width = (int)( 100 / count( $t_status_array ) );
foreach( $t_status_array as $t_status => $t_name ) {
--
1.7.1.msysgit.1
| ||||
|
MantisBT: master 55ec936b 2010-05-13 03:16 Kirill Krasnov Committer: dhx Details Diff |
Fix 0011927: html_status_legend has code paths that return invalid HTML The html_status_legend function in html_api.php first prints opening table tags such as <table>. There are then code paths within the function that return without adding the closing </table> etc tags to the table. This causes rendering problems in browsers as the output HTML can be invalid. Signed-off-by: David Hicks <hickseydr@optusnet.com.au> |
Affected Issues 0011927 |
|
| mod - core/html_api.php | Diff File | ||