Piggyback on the existing C++ code for HTML quoting, fixes #780