View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004175 | mantisbt | bugtracker | public | 2004-07-22 08:27 | 2004-08-29 02:35 |
Reporter | winge | Assigned To | vboctor | ||
Priority | normal | Severity | text | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.19.0a2 | ||||
Fixed in Version | 0.19.0rc1 | ||||
Summary | 0004175: Links are not hyperlinked properly if containing '[' or ']' | ||||
Description | See the bug note in 0004108. | ||||
Tags | No 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); | ||||