From a3ed82ad0622aaed0777e63280a2487322c49bad Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 11 Apr 2015 18:45:14 +0200 Subject: [PATCH 01/17] Move sessionKey setting from settings.json to SESSIONKEY.txt --- settings.json.template | 4 ---- src/node/utils/Settings.js | 14 ++++++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/settings.json.template b/settings.json.template index ea7ed1e12..039413d13 100644 --- a/settings.json.template +++ b/settings.json.template @@ -15,10 +15,6 @@ "ip": "0.0.0.0", "port" : 9001, - // Session Key, used for reconnecting user sessions - // Set this to a secure string at least 10 characters long. Do not share this value. - "sessionKey" : "", - /* // Node native SSL support // this is disabled by default diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 7e0e6c5a1..bd15a2dfd 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -286,13 +286,15 @@ exports.reloadSettings = function reloadSettings() { } } - if(!exports.sessionKey){ // If the secretKey isn't set we also create yet another unique value here - exports.sessionKey = randomString(32); - var sessionWarning = "You need to set a sessionKey value in settings.json, this will allow your users to reconnect to your Etherpad Instance if your instance restarts"; - if(!exports.suppressErrorsInPadText){ - exports.defaultPadText = exports.defaultPadText + "\nWarning: " + sessionWarning + suppressDisableMsg; + if (!exports.sessionKey) { + try { + exports.sessionKey = fs.readFileSync("./SESSIONKEY.txt","utf8"); + } catch(e) { + exports.sessionKey = randomString(32); + fs.writeFileSync("./SESSIONKEY.txt",exports.sessionKey,"utf8"); } - console.warn(sessionWarning); + } else { + console.warn("Declaring the sessionKey in the settings.json is deprecated. This value is auto-generated now. Please remove the setting from the file."); } if(exports.dbType === "dirty"){ From a896d67e8c5aec468f70f740affef037d1994bce Mon Sep 17 00:00:00 2001 From: Tom Hunkapiller Date: Sat, 11 Apr 2015 11:55:36 -0500 Subject: [PATCH 02/17] make setPadRaw async; streamline .etherpad file import handling chain --- src/node/handler/ImportHandler.js | 44 +++++++++++++------------------ src/node/utils/ImportEtherpad.js | 13 ++------- 2 files changed, 21 insertions(+), 36 deletions(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index ba6f4415a..7ad82a87d 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -113,10 +113,8 @@ exports.doImport = function(req, res, padId) if(ERR(err, callback)) return callback(); if(result.length > 0){ // This feels hacky and wrong.. importHandledByPlugin = true; - callback(); - }else{ - callback(); } + callback(); }); }, function(callback) { @@ -145,7 +143,7 @@ exports.doImport = function(req, res, padId) }, //convert file to html function(callback) { - if(!importHandledByPlugin || !directDatabaseAccess){ + if(!importHandledByPlugin && !directDatabaseAccess){ var fileEnding = path.extname(srcFile).toLowerCase(); var fileIsHTML = (fileEnding === ".html" || fileEnding === ".htm"); var fileIsTXT = (fileEnding === ".txt"); @@ -171,28 +169,24 @@ exports.doImport = function(req, res, padId) }, function(callback) { - if (!abiword){ - if(!directDatabaseAccess) { - // Read the file with no encoding for raw buffer access. - fs.readFile(destFile, function(err, buf) { - if (err) throw err; - var isAscii = true; - // Check if there are only ascii chars in the uploaded file - for (var i=0, len=buf.length; i 240) { - isAscii=false; - break; - } + if (!abiword && !directDatabaseAccess){ + // Read the file with no encoding for raw buffer access. + fs.readFile(destFile, function(err, buf) { + if (err) throw err; + var isAscii = true; + // Check if there are only ascii chars in the uploaded file + for (var i=0, len=buf.length; i 240) { + isAscii=false; + break; } - if (isAscii) { - callback(); - } else { - callback("uploadFailed"); - } - }); - }else{ - callback(); - } + } + if (isAscii) { + callback(); + } else { + callback("uploadFailed"); + } + }); } else { callback(); } diff --git a/src/node/utils/ImportEtherpad.js b/src/node/utils/ImportEtherpad.js index 37863bfff..bf1129cb9 100644 --- a/src/node/utils/ImportEtherpad.js +++ b/src/node/utils/ImportEtherpad.js @@ -21,20 +21,11 @@ var db = require("../db/DB").db; exports.setPadRaw = function(padId, records, callback){ records = JSON.parse(records); - // !! HACK !! - // If you have a really large pad it will cause a Maximum Range Stack crash - // This is a temporary patch for that so things are kept stable. - var recordCount = Object.keys(records).length; - if(recordCount >= 50000){ - console.warn("Etherpad file is too large to import.. We need to fix this. See https://github.com/ether/etherpad-lite/issues/2524"); - return callback("tooLarge", false); - } - async.eachSeries(Object.keys(records), function(key, cb){ var value = records[key] if(!value){ - cb(); // null values are bad. + return setImmediate(cb); } // Author data @@ -76,7 +67,7 @@ exports.setPadRaw = function(padId, records, callback){ // Write the value to the server db.set(newKey, value); - cb(); + setImmediate(cb); }, function(){ callback(null, true); }); From 8ed12c77761dfb3158487c39f4fca5eba5d0bab1 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 11 Apr 2015 21:22:00 +0100 Subject: [PATCH 03/17] session key is now ignored and also padOptions are available in settings --- .gitignore | 1 + settings.json.template | 15 +++++++++++++++ src/node/handler/PadMessageHandler.js | 1 + src/node/utils/Settings.js | 17 +++++++++++++++++ src/static/js/pad.js | 15 ++++++++++++++- 5 files changed, 48 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c6ec3f9fb..52d60dca7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules settings.json !settings.json.template APIKEY.txt +SESSIONKEY.txt bin/abiword.exe bin/node.exe etherpad-lite-win.zip diff --git a/settings.json.template b/settings.json.template index 039413d13..39c383eda 100644 --- a/settings.json.template +++ b/settings.json.template @@ -49,6 +49,21 @@ //the default text of a pad "defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at http:\/\/etherpad.org\n", + + /* Default Pad behavior, users can override by changing */ + "padOptions": { + "noColors": false, + "showControls": true, + "showChat": true, + "showLineNumbers": true, + "useMonospaceFont": false, + "userName": false, + "userColor": false, + "rtl": false, + "alwaysShowChat": false, + "chatAndUsers": false, + "lang": "en-gb" + }, /* Shoud we suppress errors from being visible in the default Pad Text? */ "suppressErrorsInPadText" : false, diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index c210ab2b3..e15af1a46 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -1182,6 +1182,7 @@ function handleClientReady(client, message) "userIsGuest": true, "userColor": authorColorId, "padId": message.padId, + "padOptions": settings.padOptions, "initialTitle": "Pad: " + message.padId, "opts": {}, // tell the client the number of the latest chat-message, which will be diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index bd15a2dfd..3886e6453 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -84,6 +84,23 @@ exports.dbSettings = { "filename" : path.join(exports.root, "dirty.db") }; */ exports.defaultPadText = "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nEtherpad on Github: http:\/\/j.mp/ep-lite\n"; +/** + * The default Pad Settings for a user (Can be overridden by changing the setting + */ +exports.padOptions = { + "noColors": false, + "showControls": true, + "showChat": true, + "showLineNumbers": true, + "useMonospaceFont": false, + "userName": false, + "userColor": false, + "rtl": false, + "alwaysShowChat": false, + "chatAndUsers": false, + "lang": "en-gb" +} + /** * The toolbar buttons and order. */ diff --git a/src/static/js/pad.js b/src/static/js/pad.js index f1de80f0f..a2c76c08c 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -126,6 +126,18 @@ var getParameters = [ function getParams() { + // Tries server enforced options first.. + for(var i = 0; i < getParameters.length; i++) + { + var setting = getParameters[i]; + var value = clientVars.padOptions[setting.name]; + if(value.toString() === setting.checkVal) + { + setting.callback(value); + } + } + + // Then URL applied stuff var params = getUrlVars() for(var i = 0; i < getParameters.length; i++) @@ -475,7 +487,6 @@ var pad = { { // start the custom js if (typeof customStart == "function") customStart(); - getParams(); handshake(); // To use etherpad you have to allow cookies. @@ -495,6 +506,8 @@ var pad = { //initialize the chat chat.init(this); + getParams(); + padcookie.init(); // initialize the cookies pad.initTime = +(new Date()); pad.padOptions = clientVars.initialOptions; From fc0cac0cad9a3fee5fe1910dd5ee31f0bc05223c Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Sat, 11 Apr 2015 22:01:46 +0100 Subject: [PATCH 04/17] merge object settings into default settings --- src/node/utils/Settings.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 3886e6453..b7d1f0bc3 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -28,6 +28,7 @@ var jsonminify = require("jsonminify"); var log4js = require("log4js"); var randomString = require("./randomstring"); var suppressDisableMsg = " -- To suppress these warning messages change suppressErrorsInPadText to true in your settings.json\n"; +var _ = require("underscore"); /* Root path of the installation */ exports.root = path.normalize(path.join(npm.dir, "..")); @@ -272,7 +273,11 @@ exports.reloadSettings = function reloadSettings() { //or it's a settings hash, specific to a plugin if(exports[i] !== undefined || i.indexOf('ep_')==0) { - exports[i] = settings[i]; + if (_.isObject(settings[i]) && !_.isArray(settings[i])) { + exports[i] = _.defaults(settings[i], exports[i]); + } else { + exports[i] = settings[i]; + } } //this setting is unkown, output a warning and throw it away else From 5435063a2f76a7573a680f9a19d84a08bcae0317 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 12 Apr 2015 10:35:24 +0100 Subject: [PATCH 05/17] re-fix rtl --- src/static/js/pad_editor.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/static/js/pad_editor.js b/src/static/js/pad_editor.js index b1ea09f72..2514cd126 100644 --- a/src/static/js/pad_editor.js +++ b/src/static/js/pad_editor.js @@ -136,8 +136,6 @@ var padeditor = (function() var v; v = getOption('rtlIsTrue', ('rtl' == html10n.getDirection())); - // Override from parameters if true - if(settings.rtlIsTrue === true) v = true; self.ace.setProperty("rtlIsTrue", v); padutils.setCheckbox($("#options-rtlcheck"), v); From 6a027d88a90c7ac70ad23af4786cd79a3b47c8b5 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 12 Apr 2015 13:00:01 +0100 Subject: [PATCH 06/17] fix older IEs --- src/static/js/ace2_inner.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 555512118..1120b2c12 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -1923,7 +1923,11 @@ function Ace2Inner(){ if (charsLeft === 0) { var index = 0; - browser.msie = false; // Temp fix to resolve enter and backspace issues.. + + if (browser.msie && parseInt(browser.version) >= 11) { + browser.msie = false; // Temp fix to resolve enter and backspace issues.. + // Note that this makes MSIE behave like modern browsers.. + } if (browser.msie && line == (rep.lines.length() - 1) && lineNode.childNodes.length === 0) { // best to stay at end of last empty div in IE From 4ef6604ca92676d0ed69aca1e1ca24a0b46d443d Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 12 Apr 2015 13:16:32 +0100 Subject: [PATCH 07/17] dont test against IE8 any more as we dont care about it --- tests/frontend/travis/remote_runner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/frontend/travis/remote_runner.js b/tests/frontend/travis/remote_runner.js index b94d8c3ed..56e93f850 100644 --- a/tests/frontend/travis/remote_runner.js +++ b/tests/frontend/travis/remote_runner.js @@ -82,12 +82,14 @@ sauceTestWorker.push({ , 'version' : '' }); +/* // IE 8 sauceTestWorker.push({ 'platform' : 'Windows 2003' , 'browserName' : 'iexplore' , 'version' : '8' }); +*/ // IE 9 sauceTestWorker.push({ From 0dfecb3af77b0b546714c714a52274f55e4437cf Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 12 Apr 2015 14:05:49 +0100 Subject: [PATCH 08/17] change target for IE 9 test --- tests/frontend/travis/remote_runner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/frontend/travis/remote_runner.js b/tests/frontend/travis/remote_runner.js index 56e93f850..f7b21ed52 100644 --- a/tests/frontend/travis/remote_runner.js +++ b/tests/frontend/travis/remote_runner.js @@ -93,7 +93,7 @@ sauceTestWorker.push({ // IE 9 sauceTestWorker.push({ - 'platform' : 'Windows 2008' + 'platform' : 'Windows XP' , 'browserName' : 'iexplore' , 'version' : '9' }); From 0fa7650df8f940ed6b577d79836a78eb09726c4b Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 12 Apr 2015 17:12:35 +0200 Subject: [PATCH 09/17] dont allow directory traversal #2 --- src/node/utils/Minify.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index ba45ab75e..3b0be38c2 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -165,7 +165,6 @@ function minify(req, res, next) var plugin = plugins.plugins[library]; var pluginPath = plugin.package.realPath; filename = path.relative(ROOT_DIR, pluginPath + libraryPath); - filename = filename.replace(/\\/g, '/'); // Windows (safe generally?) } else if (LIBRARY_WHITELIST.indexOf(library) != -1) { // Go straight into node_modules // Avoid `require.resolve()`, since 'mustache' and 'mustache/index.js' From 629f909d572bfd0f0dc8592bc856c8f7a4c7b25c Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 13 Apr 2015 10:52:15 +0100 Subject: [PATCH 10/17] add some semicoolons to prevent chrome warning --- src/static/js/html10n.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index 19cf9de18..44abd7a0b 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -681,9 +681,9 @@ window.html10n = (function(window, document, undefined) { // Expand two-part locale specs var i=0 langs.forEach(function(lang) { - if(!lang) return - langs[i++] = lang - if(~lang.indexOf('-')) langs[i++] = lang.substr(0, lang.indexOf('-')) + if(!lang) return; + langs[i++] = lang; + if(~lang.indexOf('-')) langs[i++] = lang.substr(0, lang.indexOf('-')); }) this.build(langs, function(er, translations) { From 64d94cb3464303a2564ee8dca28b2a872c30d650 Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 13 Apr 2015 17:27:14 +0200 Subject: [PATCH 11/17] Release version 1.5.5 --- CHANGELOG.md | 13 +++++++++++++ src/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 926e3d3c9..82c1e117b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +# 1.5.5 + * SECURITY: Also don't allow read files on directory traversal on minify paths + * NEW: padOptions can be set in settings.json now + * Fix: Add check for special characters in createPad API function + * Fix: Middle click on a link in firefox don't paste text anymore + * Fix: Made setPadRaw async to import larger etherpad files + * Fix: rtl + * Fix: Problem in older IEs + * Other: Update to express 4.x + * Other: Dropped support for node 0.8 + * Other: Update ejs to version 2.x + * Other: Moved sessionKey from settings.json to a new auto-generated SESSIONKEY.txt file + # 1.5.4 * SECURITY: Also don't allow read files on directory traversal on frontend tests path diff --git a/src/package.json b/src/package.json index cd8cea5b1..8aed8ffb4 100644 --- a/src/package.json +++ b/src/package.json @@ -55,5 +55,5 @@ "repository" : { "type" : "git", "url" : "http://github.com/ether/etherpad-lite.git" }, - "version" : "1.5.4" + "version" : "1.5.5" } From 33594a724682054d9bea7f983381d80cd9f46848 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 15 Apr 2015 11:52:03 +0100 Subject: [PATCH 12/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bef84656f..12ea3998a 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Documentation can be found in `docs/`. # Development ## Things you should know -Read this [git guide](http://learn.github.com/p/index.html) and watch this [video on getting started with Etherpad Development](http://youtu.be/67-Q26YH97E). +Understand [git](https://training.github.com/) and watch this [video on getting started with Etherpad Development](http://youtu.be/67-Q26YH97E). If you're new to node.js, start with Ryan Dahl's [Introduction to Node.js](http://youtu.be/jo_B4LTHi3I). From a3ce6b1ca78f4e5a92d39228122d778f47757e38 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 15 Apr 2015 15:51:13 +0100 Subject: [PATCH 13/17] remove two pointless dep removes --- bin/buildForWindows.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh index 212e946b4..6acf20b31 100755 --- a/bin/buildForWindows.sh +++ b/bin/buildForWindows.sh @@ -56,8 +56,6 @@ echo "remove git history to reduce folder size" rm -rf .git/objects echo "remove windows jsdom-nocontextify/test folder" -rm -rf /tmp/etherpad-lite-win/node_modules/ep_etherpad-lite/node_modules/jsdom-nocontextifiy/test/ -rm -rf /tmp/etherpad-lite-win/src/node_modules/jsdom-nocontextifiy/test/ rm -rf /tmp/etherpad-lite-win/src/node_modules/wd/node_modules/request/node_modules/form-data/node_modules/combined-stream/test rm -rf /tmp/etherpad-lite-win/src/node_modules/nodemailer/node_modules/mailcomposer/node_modules/mimelib/node_modules/encoding/node_modules/iconv-lite/encodings/tables From 6ff7d4e9a6f86d7a544adb029de5df9afc48b4c6 Mon Sep 17 00:00:00 2001 From: Tom Hunkapiller Date: Wed, 15 Apr 2015 14:30:53 -0500 Subject: [PATCH 14/17] revert to old path handling, but strip out "..". fixes #2614 --- src/node/utils/Minify.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index 3b0be38c2..ee8f5f455 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -143,8 +143,11 @@ function minify(req, res, next) // No relative paths, especially if they may go up the file hierarchy. filename = path.normalize(path.join(ROOT_DIR, filename)); + filename = filename.replace(/\.\./g, '') + if (filename.indexOf(ROOT_DIR) == 0) { filename = filename.slice(ROOT_DIR.length); + filename = filename.replace(/\\/g, '/') } else { res.writeHead(404, {}); res.end(); @@ -165,6 +168,7 @@ function minify(req, res, next) var plugin = plugins.plugins[library]; var pluginPath = plugin.package.realPath; filename = path.relative(ROOT_DIR, pluginPath + libraryPath); + filename = filename.replace(/\\/g, '/'); // windows path fix } else if (LIBRARY_WHITELIST.indexOf(library) != -1) { // Go straight into node_modules // Avoid `require.resolve()`, since 'mustache' and 'mustache/index.js' From f81c6b64762533bda9462ba2b466c64ab08fddd5 Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 16 Apr 2015 22:56:14 +0200 Subject: [PATCH 15/17] Update node version for windows build to 0.12.2 --- bin/buildForWindows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh index 212e946b4..9e8db1cc6 100755 --- a/bin/buildForWindows.sh +++ b/bin/buildForWindows.sh @@ -1,6 +1,6 @@ #!/bin/sh -NODE_VERSION="0.10.38" +NODE_VERSION="0.12.2" #Move to the folder where ep-lite is installed cd `dirname $0` From 2393ea01f0b0749d36c161e42e3676bf2735398e Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 16 Apr 2015 23:06:24 +0200 Subject: [PATCH 16/17] Release version 1.5.6 --- CHANGELOG.md | 3 +++ src/package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82c1e117b..84d85000d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.5.6 + * Fix: Error on windows installations + # 1.5.5 * SECURITY: Also don't allow read files on directory traversal on minify paths * NEW: padOptions can be set in settings.json now diff --git a/src/package.json b/src/package.json index 8aed8ffb4..bfd3f2606 100644 --- a/src/package.json +++ b/src/package.json @@ -55,5 +55,5 @@ "repository" : { "type" : "git", "url" : "http://github.com/ether/etherpad-lite.git" }, - "version" : "1.5.5" + "version" : "1.5.6" } From d31523aa08d123f421248e249e2194f7689f0b06 Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 17 Apr 2015 15:58:23 +0100 Subject: [PATCH 17/17] Update hooks_server-side.md --- doc/api/hooks_server-side.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/hooks_server-side.md b/doc/api/hooks_server-side.md index c7e7a43af..717abe75d 100644 --- a/doc/api/hooks_server-side.md +++ b/doc/api/hooks_server-side.md @@ -254,7 +254,7 @@ var Changeset = require("ep_etherpad-lite/static/js/Changeset"); exports.getLineHTMLForExport = function (hook, context) { var header = _analyzeLine(context.attribLine, context.apool); if (header) { - return "<" + header + ">" + context.lineContents + ""; + return "<" + header + ">" + context.lineContent + ""; } }