Skip to content

Commit

Permalink
- Link within link issue: Solved.
Browse files Browse the repository at this point in the history
  • Loading branch information
willcast committed Oct 15, 2003
1 parent 841da5f commit 1a1370b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mod/glossary/dynalink.php
Expand Up @@ -83,8 +83,9 @@ function glossary_link_concepts($text,$concept,$href_tag_begin,$href_tag_end = "
foreach (array_unique($list_of_links[0]) as $key=>$value) {
$links['<|*'.$key.'*|>'] = $value;
}
$text = str_replace($links,array_keys($links),$text);

if ( $links ) {
$text = str_replace($links,array_keys($links),$text);
}
// getting ride of all other tahs
$final = array();
preg_match_all('/<(.+?)>/is',$text,$list_of_words);
Expand All @@ -105,8 +106,9 @@ function glossary_link_concepts($text,$concept,$href_tag_begin,$href_tag_end = "

$text = eregi_replace("$list_of_words_cp", "$href_tag_begin"."\\1"."$href_tag_end", $text);
$text = str_replace(array_keys($final),$final,$text);
$text = str_replace(array_keys($links),$links,$text);

if ( $links ) {
$text = str_replace(array_keys($links),$links,$text);
}
return stripslashes($text);
}

Expand Down

0 comments on commit 1a1370b

Please sign in to comment.