From 0fa639ebc72bc13cdf476674492b056d62c4c70a Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 3 Oct 2016 01:33:47 +0300 Subject: [PATCH] Extract and \n'+obj.html; + } + obj.html = htmlawed.sanitize(obj.html||'', { safe: 1, elements: '* +style', keep_bad: 2, comment: 1 }); let upd = { body_text: obj.text||'', body_html: obj.html }; upd.body_html_text = obj.html.replace(/]*>.*<\/style\s*>|<\/?[^>]*>/g, ''); yield pg.update('messages m', upd).where({ folder_id: boxId, uid: msg[0].uid }).run(gen.ef());