html-preview: use json.dumps() for markup conversion

Certainly better for most scenarios. May need further tweaking by someone
who cares enough to track down what marked.js is doing.

Fixes #1244
1 job for master in 46 minutes and 48 seconds
Status Job ID Name Coverage
  Test
passed #791770
flatpak
flatpak

00:46:48