Although Q2A allows the user of layers and themes to output HTML, for some reason, the core itself spits HTML. That means regardless of how great a plugin or theme system is, you will, sooner or later, end up parsing HTML. I'm not going to preach about MVC but I just wanted to note that.
This is how to remove the HTML that comes from the core. Make sure the doctype() function in qa-theme.php looks like this:
function doctype() {
qa_html_theme_base::doctype();
$anonymous = qa_lang_html('main/anonymous');
if (isset($this->content['q_view']['who']['data']) && strpos($this->content['q_view']['who']['data'], 'class="qa-ip-link">' . $anonymous . '</a>') !== FALSE) {
$this->content['q_view']['who']['data'] = $anonymous;
}
}
Now, if you have installed any other plugin tha adds HTML to the 'data' value then this will remove that too. That means you'll have to parse that custom HTML yourself. The above solution parses only the HTML that comes from the Q2A core (at least on the current 1.6.3 version).