Skip to content

Commit

Permalink
Fix #9663: Changelog underlines incorrect lengths
Browse files Browse the repository at this point in the history
The text underlines on the changelog page are displayed with an incorrect
length when the version name contains characters that are encodable via
htmlspecialchars(). We need to use the length of the raw string instead
of the length of the encoded string.
  • Loading branch information
davidhicks committed Sep 22, 2010
1 parent b23efa9 commit 80b8b1a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions changelog_page.php
Expand Up @@ -78,7 +78,6 @@ function print_version_header( $p_version_id ) {
$t_version_name = version_get_field( $p_version_id, 'version' );
$t_project_name = project_get_field( $t_project_id, 'name' );

$t_release_title_without_hyperlinks = string_display_line( $t_project_name ) . ' - ' . string_display_line( $t_version_name );
$t_release_title = '<a href="changelog_page.php?project_id=' . $t_project_id . '">' . string_display_line( $t_project_name ) . '</a> - <a href="changelog_page.php?version_id=' . $p_version_id . '">' . string_display_line( $t_version_name ) . '</a>';

if ( config_get( 'show_changelog_dates' ) ) {
Expand All @@ -96,7 +95,7 @@ function print_version_header( $p_version_id ) {

echo '<br />', $t_release_title, $t_release_date, lang_get( 'word_separator' ), print_bracket_link( 'view_all_set.php?type=1&temporary=y&' . FILTER_PROPERTY_PROJECT_ID . '=' . $t_project_id . '&' . filter_encode_field_and_value( FILTER_PROPERTY_FIXED_IN_VERSION, $t_version_name ), lang_get( 'view_bugs_link' ) ), '<br />';

$t_release_title_without_hyperlinks .= $t_release_date;
$t_release_title_without_hyperlinks = $t_project_name . ' - ' . $t_version_name . $t_release_date;
echo utf8_str_pad( '', utf8_strlen( $t_release_title_without_hyperlinks ), '=' ), '<br />';
}

Expand Down

0 comments on commit 80b8b1a

Please sign in to comment.