diff options
Diffstat (limited to 'generator/postrenderer.js')
-rw-r--r-- | generator/postrenderer.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/generator/postrenderer.js b/generator/postrenderer.js index cc29b08..64cbb99 100644 --- a/generator/postrenderer.js +++ b/generator/postrenderer.js @@ -13,6 +13,7 @@ const btoa=require('btoa'); const sha256=require('./sha256').sha256; const spawn=require('child_process').spawn; const util=require('./util'); +const htmlescape = util.htmlescape; const THUMB_IMAGE_URL='//filestorage.chrisoft.org/blog/img/'; const THUMB_LOCAL_DIR='../content/img/'; @@ -148,14 +149,6 @@ function _style_to_header(doc) for (let s of styles) head.appendChild(s); } -function htmlescape(s) -{ - return s.replace(/</g, "<") - .replace(/>/g, ">") - .replace(/&/g, "&") - .replace(/"/g, """) - .replace(/'/g, "'"); -} async function _render(inf,outf,np,pp) { const postcont=fs.readFileSync(inf,'utf8'); |