View Issue Details

IDProjectCategoryView StatusLast Update
0004175mantisbtbugtrackerpublic2004-08-29 02:35
Reporterwinge Assigned Tovboctor  
PrioritynormalSeveritytextReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.0a2 
Fixed in Version0.19.0rc1 
Summary0004175: Links are not hyperlinked properly if containing '[' or ']'
Description

See the bug note in 0004108.

TagsNo tags attached.
Attached Files
square_brackets_in_links.diff (886 bytes)   
Index: core/string_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/string_api.php,v
retrieving revision 1.54
diff -u -r1.54 string_api.php
--- core/string_api.php	20 Jul 2004 15:31:03 -0000	1.54
+++ core/string_api.php	22 Jul 2004 13:36:16 -0000
@@ -198,7 +198,7 @@
 		# This is based on the description in RFC 2396 which specifies how
 		#  to match URLs generically without knowing their type
 		# vboctor: I added # to hyperlink bookmarks.
-		$p_string = preg_replace( '/(([[:alpha:]][-+.[:alnum:]]*):\/\/(%[[:digit:]A-Fa-f]{2}|[-_.!~*\';\/?:@&=+$#\(\),[:alnum:]])+)/s',
+		$p_string = preg_replace( '/(([[:alpha:]][-+.[:alnum:]]*):\/\/(%[[:digit:]A-Fa-f]{2}|[-_.!~*\';\/?:@&=+$#\(\),\[\][:alnum:]])+)/s',
 								'<a href="\1">\1</a> [<a href="\1" target="blank">^</a>]',
 								$p_string);
 

Activities