revert title replacement for the moment

This commit is contained in:
webzwo0i 2020-09-14 13:00:42 +02:00
parent d662bcd2fd
commit 17fac52aba

View file

@ -213,13 +213,10 @@ async function doImport(req, res, padId)
* title and comment it out independently on the classes that are set on it.
*
* @todo what happens if <title is used somewhere in the pad? need proper XML parser
* @todo does not work all the time
*/
if (text.match(/<\/title>/)){
text = text.replace("<title", "<!-- <title");
text = text.replace("</title>","</title>-->");
} else {
text = text.replace(/<title[^>]*\/>/,'');
}
text = text.replace("<title", "<!-- <title");
text = text.replace("</title>","</title>-->");
// node on windows has a delay on releasing of the file lock.
// We add a 100ms delay to work around this