diff --git a/www/pad/main.js b/www/pad/main.js index 2056cd4e5..31490a5ce 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -393,8 +393,9 @@ define([ Dom = Dom || (new DOMParser()).parseFromString(data,"text/html"); return ('\n' + '\n' + - Dom.head.outerHTML + '\n' + - Dom.body.outerHTML); + (typeof(Hyperjson.toString) === 'function'? + Hyperjson.toString(Hyperjson.fromDOM(Dom.body)): + Dom.head.outerHTML) + '\n'); }; var domFromHTML = function (html) {