Inline phylogeny from Newick description
This would, of course, be lovely.
I did this for pubmed, and you can make whatever you want happen by extending onebox.
I don’t know Ruby, and bungled my way through with a little help. Let me know if you have questions.
Seems like there are a couple of ways you could go here.
You could probably do a server-side thing with ruby/onebox. In that case you might want to look at Newick-ruby (take a quick peek at the bottom of the page there). Unfortunately, that seems to only output PDF though, so you would probably have to call out to inkscape for SVG conversion.
EDIT: Just remembered that onebox does render out to mustache/js templates, so you might be able to use that together with your js code, but it’s not clear that would be so straightforward. I’m guessing the route of the mathjax plugin might be a more natural fit.