<?php

class Plugin_anchor extends Plugin
{
	function do_inline($pagename, $param1, $param2)
	{
		$id = htmlspecialchars(trim($param1));
		$html = convert_inline($param2, $pagename);
		$str = mb_eregi_replace('(?:<a\s.*?>|</a>)', '', $html);
		return "<a href=\"#$id\">" . $str . '</a>';
	}
}

?>