fix bug 982174: Ensure build_json_data uses rendered HTML when available