Skip to content

Commit

Permalink
Fix #14748: XML Parsing Error in print_all_bug_page_word.php
Browse files Browse the repository at this point in the history
When printing a bug with inline image attachments, an XML parsing error
was triggered due to lack of html encoding of the image's URL.
  • Loading branch information
dregad committed Sep 27, 2012
1 parent 2b5d662 commit 6579339
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions print_all_bug_page_word.php
Expand Up @@ -473,13 +473,15 @@
}

$c_filename = string_display_line( $t_attachment['display_name'] );
$c_download_url = $t_path . htmlspecialchars( $t_attachment['download_url'] );
$c_download_url = htmlspecialchars( $t_attachment['download_url'] );
$c_filesize = number_format( $t_attachment['size'] );
$c_date_added = date( $t_date_format, $t_attachment['date_added'] );
echo "$c_filename ($c_filesize) <span class=\"italic\">$c_date_added</span><br />$c_download_url";
echo "$c_filename ($c_filesize " . lang_get( 'bytes' ) . ') '
. '<span class="italic-small">' . $c_date_added . '</span><br />'
. string_display_links( $t_path . $c_download_url );

if ( $t_attachment['preview'] && $t_attachment['type'] == 'image' && $f_type_page == 'html' ) {
echo '<br /><img src="', $t_attachment['download_url'], '" alt="', $t_attachment['alt'], '" /><br />';
echo '<br /><img src="', $c_download_url, '" alt="', $t_attachment['alt'], '" /><br />';
}
}
?>
Expand Down

0 comments on commit 6579339

Please sign in to comment.