From abb10f112aa1248700e98caa0273f6afc5154a47 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 22 Jun 2024 20:07:43 -0400 Subject: Yes we are 2.6 now. --- generator/postrenderer.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'generator/postrenderer.js') 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, "'"); -} async function _render(inf,outf,np,pp) { const postcont=fs.readFileSync(inf,'utf8'); -- cgit v1.2.3