summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/release.js34
-rw-r--r--dirty.db0
-rw-r--r--src/node/handler/ImportHandler.js12
3 files changed, 44 insertions, 2 deletions
diff --git a/bin/release.js b/bin/release.js
new file mode 100644
index 00000000..bac83d84
--- /dev/null
+++ b/bin/release.js
@@ -0,0 +1,34 @@
+// A script to Release Etherpad.
+
+var etherRelease = {
+ init: function(){
+ // promptUser
+ promptUser(function(){
+ package.update(version){
+
+
+ }
+ });
+ },
+ versionNumber: function(){
+ get: function(){
+
+ }
+ },
+
+
+ versionNumber.get: function(){
+
+
+ },
+
+ /* Continuous integration */
+ ci: function(){
+ hasPassed = function(){
+ // TODO
+ return true;
+ }
+ },
+
+
+}
diff --git a/dirty.db b/dirty.db
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dirty.db
diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js
index d6b15eaf..98909354 100644
--- a/src/node/handler/ImportHandler.js
+++ b/src/node/handler/ImportHandler.js
@@ -28,7 +28,9 @@ var ERR = require("async-stacktrace")
, settings = require('../utils/Settings')
, formidable = require('formidable')
, os = require("os")
- , importHtml = require("../utils/ImportHtml");
+ , importHtml = require("../utils/ImportHtml")
+ , log4js = require('log4js');
+
//load abiword only if its enabled
if(settings.abiword != null)
@@ -42,6 +44,8 @@ var tmpDirectory = process.env.TEMP || process.env.TMPDIR || process.env.TMP ||
*/
exports.doImport = function(req, res, padId)
{
+ var apiLogger = log4js.getLogger("ImportHandler");
+
//pipe to a file
//convert file to html via abiword
//set html in the pad
@@ -169,7 +173,11 @@ exports.doImport = function(req, res, padId)
function(callback) {
var fileEnding = path.extname(srcFile).toLowerCase();
if (abiword || fileEnding == ".htm" || fileEnding == ".html") {
- importHtml.setPadHTML(pad, text);
+ try{
+ importHtml.setPadHTML(pad, text);
+ }catch(e){
+ apiLogger.warn("Error importing, possibly caused by malformed HTML");
+ }
} else {
pad.setText(text);
}