modify strip_tags function to use term slug instead of term name

While I can’t guarentee that this is what you are looking for (as you have not posted what your expected output should be), hopefully this will help.

Even if it’s not exactly what you are looking for, you have the whole object for each term available to you so that you can manipulate the output exactly as you wish.

/** Grab the terms within the for the 'portfolio_cat' taxonomy for the current post */
$terms = wp_get_object_terms($post->ID, 'portfolio_cat'); // If you are in The Loop you can replace '$post->ID' with 'get_the_ID()'

/** Loop through each term and add them to an array */
$formatted_terms = array();
foreach($terms as $term) :

    $formatted_terms[] = sprintf(
        '<a href="https://wordpress.stackexchange.com/questions/179336/urlhere/%1$s" title="View posts in $2%s">%3$s</a>',
        $term->slug,            /** %1$s - The term slug (for the 'href' attribute)*/
        esc_attr($term->name),  /** %2$s - The term name (formatted for the 'title' attribute) */
        $term->name             /** %1$s - The term name (for display) */
    );

endforeach;

/** Output the terms, formatted as you desire */
echo join(',', $formatted_terms);

The function that is used to achieve your desired output is wp_get_object_terms(). If you require, you can pass a 3rd parameter as an array containing arguments to order the terms and to only retrun certain fields, so please take a look at the Function Reference.

With the code above the $temrs are returned as an array of objects, and should you wish to use any more of the fields returned for each term here is how the object is formatted –

[0] => stdClass Object
    (
        [term_id] => 22
        [name] => My Taxonomy Term
        [slug] => my-taxonomy-term
        [term_group] => 0
        [term_taxonomy_id] => 29
        [taxonomy] => portfolio_cat
        modify strip_tags function to use term slug instead of term name => 
        [parent] => 20
        [count] => 5
        [filter] => raw
    )