I'd use preprocess_regexps to change the <a> tag.
http://calibre-ebook.com/user_manual...rocess_regexps
Edit: Actually, if that didn't work, I'd switch to preprocess_html and run a regex on the <a> tag. I can't recall if preprocess_regexps runs early enough in the process.
And I'm not totally sure where your problem is - if it's in the RSS feed, then you'll need to work even earlier in the process. I'd do that by grabbing the feed page with parse_index and regex fixing the <a> links.