html.phpのhtmltag関数でできる。
// Remove all HTML tags(or just anchor tags), and WikiName-speific decorations function strip_htmltag($str, $all = TRUE)
$allがtrueの場合は、aタグのみ削除する。