diff options
author | John McLear <john@mclear.co.uk> | 2015-01-06 16:31:52 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2015-01-06 16:31:52 +0000 |
commit | 17ce67d936777eea7d85106bdf978661dde73bd8 (patch) | |
tree | c66adf5eb154f70fe0729159af6c60b0b7f40d3d /src/node/handler | |
parent | 2e2dd688e97c61271d34a2af1446276db75523f8 (diff) | |
download | etherpad-lite-17ce67d936777eea7d85106bdf978661dde73bd8.zip |
final html export hook
Diffstat (limited to 'src/node/handler')
-rw-r--r-- | src/node/handler/ExportHandler.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/node/handler/ExportHandler.js b/src/node/handler/ExportHandler.js index 0a0e51f1..0654deb4 100644 --- a/src/node/handler/ExportHandler.js +++ b/src/node/handler/ExportHandler.js @@ -158,8 +158,12 @@ exports.doExport = function(req, res, padId, type) //if this is a html export, we can send this from here directly if(type == "html") { - res.send(html); - callback("stop"); + // do any final changes the plugin might want to make cake + hooks.aCallFirst("exportHTMLSend", html, function(err, newHTML){ + if(newHTML.length) html = newHTML; + res.send(html); + callback("stop"); + }); } else //write the html export to a file { |