Commit 76e17b5a authored by Laurent Montel's avatar Laurent Montel 😁

Add charset so we can open correctly in browser

parent 655c5840
......@@ -72,7 +72,9 @@ void WebEngineExportHtmlPageJob::slotSaveHtmlToPage(const QString &text)
}
QTextStream stream(&temporaryFile);
stream.setCodec("UTF-8");
stream << text;
QString newText = text;
newText.replace(QStringLiteral("<!DOCTYPE html>"), QStringLiteral("<!DOCTYPE html><meta charset=\"UTF-8\">"));
stream << newText;
temporaryFile.close();
//We need to remove this temporary file
Q_EMIT success(temporaryFile.fileName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment