diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js index 91ebe59f7..c1fcd16f7 100644 --- a/src/node/utils/ExportHtml.js +++ b/src/node/utils/ExportHtml.js @@ -20,7 +20,7 @@ var Changeset = require("ep_etherpad-lite/static/js/Changeset"); var padManager = require("../db/PadManager"); var ERR = require("async-stacktrace"); var Security = require('ep_etherpad-lite/static/js/security'); - +var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks'); function getPadPlainText(pad, revNum) { var atext = ((revNum !== undefined) ? pad.getInternalRevisionAText(revNum) : pad.atext()); @@ -401,8 +401,21 @@ function getHTMLFromAtext(pad, atext) pieces.push(''); } lists.length--; - } - pieces.push(lineContent, '
'); + } + var newLineContent = hooks.callAllStr("getLineHTMLForExport", + { + line: line, + apool: apool, + attribLine: attribLines[i], + text: textLines[i] + }, " ", " ", ""); + if (newLineContent) + { + pieces.push(newLineContent, ''); + } else + { + pieces.push(lineContent, '
'); + } } } @@ -469,6 +482,7 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback) var head = (noDocType ? '' : '\n') + '\n' + (noDocType ? '' : '\n' + + '' + Security.escapeHTML(padId) + '\n' + '\n' + '