View Issue Details

IDProjectCategoryView StatusLast Update
0009663mantisbtroadmappublic2010-12-17 04:40
Reportergreno2 Assigned Todhx  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.2 
Target Version1.2.4Fixed in Version1.2.4 
Summary0009663: Wrong underline-charcount when Project-Name contains htmlspecialchars
Description

Underline of Project/Version via "=" counts characters after htmlspecialchars so that Ampersand (&) counts 4 characters for length of line ...

x&o AA Intranet/Internet - KW2008/53

Tagspatch
Attached Files
issue9663.patch (1,134 bytes)   
From f708b2ed618bb1e89a3e6c61cae717b8bab37aa7 Mon Sep 17 00:00:00 2001
From: Roland Becker <roland@atrol.de>
Date: Tue, 14 Sep 2010 22:20:47 +0200
Subject: [PATCH] Fix #9663: Wrong underline-charcount when Project-Name contains htmlspecialchars

---
 roadmap_page.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/roadmap_page.php b/roadmap_page.php
index 5ef5691..b0f1003 100644
--- a/roadmap_page.php
+++ b/roadmap_page.php
@@ -49,7 +49,7 @@
 		echo '<br />', $t_release_title, $t_scheduled_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_TARGET_VERSION, $t_version_name ), lang_get( 'view_bugs_link' ) ), '<br />';
 
 		$t_release_title_without_hyperlinks .= $t_scheduled_release_date;
-		echo utf8_str_pad( '', utf8_strlen( $t_release_title_without_hyperlinks ), '=' ), '<br />';
+		echo utf8_str_pad( '', utf8_strlen( html_entity_decode( $t_release_title_without_hyperlinks ) ), '=' ), '<br />';
 	}
 
 	# print project header
-- 
1.6.4.2

issue9663.patch (1,134 bytes)   

Activities

atrol

atrol

2010-09-14 16:25

developer   ~0026715

Reminder sent to: dhx

Please have a look at the patch.

atrol

atrol

2010-09-22 05:01

developer   ~0026838

Reminder sent to: dhx

maybe you missed this patch because I forgot to add the patch tag
But not really urgent ....

dhx

dhx

2010-09-22 05:40

reporter   ~0026839

Thanks for the reminder/patch Roland.

I noticed that the patch you provided could be simplified a great deal so I have done that.

This problem didn't just affect the roadmap page, it also impacted the changelog page. I've fixed both pages in both 1.2.x and 1.3.x.

Thanks :)

Related Changesets

MantisBT: master b23efa9c

2010-09-22 05:14

dhx


Details Diff
Fix 0009663: Roadmap underlines incorrect lengths

The text underlines on the roadmap 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.

Thanks to Roland Becker for the initial patch for this issue.
Affected Issues
0009663
mod - roadmap_page.php Diff File

MantisBT: master-1.2.x 922d605c

2010-09-22 05:14

dhx


Details Diff
Fix 0009663: Roadmap underlines incorrect lengths

The text underlines on the roadmap 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.

Thanks to Roland Becker for the initial patch for this issue.
Affected Issues
0009663
mod - roadmap_page.php Diff File

MantisBT: master 80b8b1ab

2010-09-22 05:14

dhx


Details Diff
Fix 0009663: Changelog underlines incorrect lengths

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.
Affected Issues
0009663
mod - changelog_page.php Diff File

MantisBT: master-1.2.x 58969dfb

2010-09-22 05:14

dhx


Details Diff
Fix 0009663: Changelog underlines incorrect lengths

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.
Affected Issues
0009663
mod - changelog_page.php Diff File