summaryrefslogtreecommitdiff
path: root/src/node/handler/ImportHandler.js
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2013-09-21 23:29:32 +0100
committerJohn McLear <john@mclear.co.uk>2013-09-21 23:29:32 +0100
commit4bea3a348ea833915dc5b0d228a282119b20c027 (patch)
treebec2dbee154a3d93fcfef734110c1c52f686e905 /src/node/handler/ImportHandler.js
parentc30101ab42f6ea30032547547732c99191394f39 (diff)
downloadetherpad-lite-4bea3a348ea833915dc5b0d228a282119b20c027.zip
strip title out of html during import, pesky abiword behavior
Diffstat (limited to 'src/node/handler/ImportHandler.js')
-rw-r--r--src/node/handler/ImportHandler.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js
index 281a8d7b..d6b15eaf 100644
--- a/src/node/handler/ImportHandler.js
+++ b/src/node/handler/ImportHandler.js
@@ -151,7 +151,10 @@ exports.doImport = function(req, res, padId)
fs.readFile(destFile, "utf8", function(err, _text){
if(ERR(err, callback)) return;
text = _text;
-
+ // Title needs to be stripped out else it appends it to the pad..
+ text = text.replace("<title>", "<!-- <title>");
+ text = text.replace("</title>-->");
+
//node on windows has a delay on releasing of the file lock.
//We add a 100ms delay to work around this
if(os.type().indexOf("Windows") > -1){