Send preprocessed text content instead of html.

And move some parsing logic from js to the server.