// till a cleaner solution can be found.
MMIOT *doc;
doc = mkd_string (str.c_str(), str.size(), 0);
- FILE *f = fopen (".biaweb.tmp", "w");
+ char tempfile[20];
+ strcpy (tempfile, "/tmp/biawebXXXXXX");
+ mkstemp (tempfile);
+ FILE *f = fopen (tempfile, "w");
markdown (doc, f, 0);
fclose (f);
- std::ifstream ftmp (".biaweb.tmp");
+ std::ifstream ftmp (tempfile);
std::string tmpl ( (std::istreambuf_iterator<char> (ftmp)),
(std::istreambuf_iterator<char> ())
);
ftmp.close ();
mkd_cleanup (doc);
- remove (".biaweb.tmp");
return tmpl;
}