I would try something like this. This is some code used to
remove all HTML tags that I modified to remove only the tag
specified in the parameter from the html passed into it. This is
untested but should at least get you started. You will need to call
this twice, once passing "a" as the tag and again with "/a" as the
tag to remove the start and end tags so there may be a better way
to do this in one call to the template.