Skip to content

Commit

Permalink
Fix #14721: XML Parsing Error in print_all_bug_page_word.php
Browse files Browse the repository at this point in the history
Revised code so that generated page complies with xhtml 1.0 strict DTD.
  • Loading branch information
dregad committed Sep 21, 2012
1 parent c7b1da5 commit 8ae62f3
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions print_all_bug_page_word.php
Expand Up @@ -106,16 +106,18 @@

$result = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count );
$t_row_count = count( $result );
?>

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<?php
html_page_top1();
html_head_end();
html_body_begin();
# Headers depending on intended output
if ( $f_type_page == 'html' ) {
html_page_top1();
html_head_end();
html_body_begin();
} else {
echo '<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">';
html_body_begin();
}

$f_bug_arr = explode( ',', $f_export );
$t_count_exported = 0;
Expand Down Expand Up @@ -170,7 +172,7 @@
# display the available and selected bugs
if ( in_array( $t_id, $f_bug_arr ) || !$f_show_flag ) {
if ( $t_count_exported > 0 ) {
echo '<br style="mso-special-character: line-break; page-break-before: always">';
echo '<br style="mso-special-character: line-break; page-break-before: always" />';
}

$t_count_exported++;
Expand Down Expand Up @@ -483,12 +485,15 @@
?>
</td>
</tr>

<tr><td colspan="6" class="print">&nbsp;</td></tr>

<?php
$t_user_bugnote_limit = 0;

$t_bugnotes = bugnote_get_all_visible_bugnotes( $t_id, $t_user_bugnote_order, $t_user_bugnote_limit );
?>
<br />
<tr><td class="print" colspan="6">
<table class="width100" cellspacing="1">
<?php
# no bugnotes
Expand Down Expand Up @@ -543,7 +548,7 @@
</tr>
</table>
</td>
<td class="nopad" width="85%">
<td class="nopad">
<table class="hide" cellspacing="1">
<tr>
<td class="print">
Expand Down Expand Up @@ -572,11 +577,15 @@
?>

</table>
</td></tr>
<?php # Bugnotes END ?>
</table>


<br /><br />
<?php
echo '<br /><br />';
} # end in_array
} # end main loop

html_body_end();
html_end();

0 comments on commit 8ae62f3

Please sign in to comment.