Skip to content

Commit 6579339

Browse files
committedSep 27, 2012
Fix #14748: XML Parsing Error in print_all_bug_page_word.php
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.
1 parent 2b5d662 commit 6579339

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎print_all_bug_page_word.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -473,13 +473,15 @@
473473
}
474474

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

481483
if ( $t_attachment['preview'] && $t_attachment['type'] == 'image' && $f_type_page == 'html' ) {
482-
echo '<br /><img src="', $t_attachment['download_url'], '" alt="', $t_attachment['alt'], '" /><br />';
484+
echo '<br /><img src="', $c_download_url, '" alt="', $t_attachment['alt'], '" /><br />';
483485
}
484486
}
485487
?>

0 commit comments

Comments
 (0)
Please sign in to comment.