View Issue Details

IDProjectCategoryView StatusLast Update
0004865mantisbtcustom fieldspublic2004-12-11 03:01
Reporternicr Assigned Tograngeway  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.1 
Fixed in Version0.19.2 
Summary0004865: Email address custom fields not displayed correctly when viewing an issue
Description

When viewing an issue, email address custom fields are hyperlinked to mailto that address when clicked. However, the code to generate the mailto HTML seems to occur in two places resulting in a broken URL. Something like: <a href="mailto:<a href="mailto:test@some.domain.com target="_new">test@some.domain.com</a>"><a href="mailto:test@some.domain.com" target="_new">test@some.domain.com</a></a>

It seems that a possible fix is to simply remove the CUSTOM_FIELD_TYPE_EMAIL switch entry from the string_custom_field_value() definition in core/custom_field_api.php

However, i am not sure whether this 'fix' breaks anything elsewhere (seems to work for me, though).

TagsNo tags attached.

Activities

nicr

nicr

2004-11-17 10:35

reporter   ~0008350

Just looking through my mantis configuration and this maybe important: $g_html_make_links is set to ON (which is the default).
Maybe this is causing the double HTML link generation i am seeing?

grangeway

grangeway

2004-11-17 13:57

reporter   ~0008351

Hi nicr/DGtlRift,

I believe i've now fixed this issue in CVS:

--- custom_field_api.php 16 Sep 2004 16:48:53 -0000 1.42
+++ custom_field_api.php 17 Nov 2004 19:57:55 -0000
@@ -942,7 +942,7 @@
$result = str_replace( '||', '', '|' . $p_value . '|' );
break;
default:

  • $result = string_display_links( $p_value );
  • $result = $p_value;
    }
    return $result;
    }
    @@ -1150,7 +1150,7 @@
    return str_replace( '|', ', ', $t_custom_field_value );
    break;
    default:
  • return $t_custom_field_value;
  • return string_display_links( $t_custom_field_value );
    }
    }

Feel free to apply the diff above, and see if this resolves the issue for you.

Paul