         if mesg.html?
             e = $("<span class='sagews-output-html'>").html(mesg.html).mathjax()
             output.append(e)
-            e.find('a').attr("target","_blank") # make all links open in a new tab
-            e.find("table").addClass('table')   # makes bootstrap tables look MUCH nicer
+            @process_html_output(e)
 
         if mesg.interact?
             @interact(output, mesg.interact)

        # Call jQuery plugin to make it all happen.
        interact_elt.sage_interact(desc:desc, execute_code:@execute_code, process_output_mesg:@process_output_mesg)

    process_output_mesg: (opts) =>
        opts = defaults opts,
            mesg    : required

            t = $('<span class="sagews-output-md">').html(x.s)
            if x.has_mathjax
                t.mathjax()
            output.append(t)
            @process_html_output(t)

        if mesg.tex?
            # latex
