diff --git a/.gitignore b/.gitignore index 4ef2717..8d36c82 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.log +*.DS_Store diff --git a/edit.js b/edit.js index 0107792..a4c5012 100644 --- a/edit.js +++ b/edit.js @@ -160,17 +160,20 @@ function handleInput(e) { var text = content.innerText; var title = QS("#doc-title").innerText; - var strip = false; - if (text.indexOf(" 0) { + var rawHTML = (text.indexOf(" 0); + if (rawHTML) { text = text.replace(/[\n|\t]+/g,' ').replace(/> + <') } else { text = content.innerHTML - strip = true } if (text.trim().length) { stringToZip(text, function(zip) { - updateLink("?" + zip, title) + if (rawHTML) { + updateLink(DATA_PREFIX_BXZE + zip, title) + } else { + updateLink("?" + zip, title) + } }); setFileName("") } else if (importedFileData) { diff --git a/index.html b/index.html index 3dbba4c..e55cf78 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + diff --git a/manifest.appcache b/manifest.appcache index e381f20..4a59fbf 100644 --- a/manifest.appcache +++ b/manifest.appcache @@ -1,4 +1,5 @@ CACHE MANIFEST CACHE: -/ \ No newline at end of file +/ + \ No newline at end of file