mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
49327
delete dsterms and add nbsp entity
This commit is contained in:
@ -1010,19 +1010,6 @@ namespace NSDoctRenderer
|
||||
strReturnParams += L"</dc:language>";
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getCreated", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
strError = L"code=\"get_created\"";
|
||||
bIsBreak = true;
|
||||
}
|
||||
else if (!js_results->isNull())
|
||||
{
|
||||
strReturnParams += L"<dcterms:created xsi:type=\"dcterms:W3CDTF\">";
|
||||
strReturnParams += js_results->toStringW();
|
||||
strReturnParams += L"</dcterms:created>";
|
||||
}
|
||||
|
||||
js_results = js_objectCore->call_func("asc_getKeywords", 1, args);
|
||||
if(try_catch->Check())
|
||||
{
|
||||
|
||||
@ -321,7 +321,7 @@ HRESULT CEpubFile::FromHtml(const std::wstring& sHtmlFile, const std::wstring& s
|
||||
NSFile::CFileBinary oIndexHtml;
|
||||
if (oIndexHtml.CreateFileW(m_sTempDir + L"/OEBPS/index.html"))
|
||||
{
|
||||
oIndexHtml.WriteStringUTF8(L"<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\">");
|
||||
oIndexHtml.WriteStringUTF8(L"<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\" [<!ENTITY nbsp \" \">]><html xmlns=\"http://www.w3.org/1999/xhtml\">");
|
||||
oIndexHtml.WriteStringUTF8(sIndexHtml);
|
||||
oIndexHtml.CloseFile();
|
||||
}
|
||||
|
||||
@ -1710,7 +1710,7 @@ HRESULT CFb2File::FromHtml(const std::wstring& sHtmlFile, const std::wstring& sC
|
||||
oDocument.WriteString(L"<title-info>");
|
||||
std::wstring sBookTitle = NSFile::GetFileName(sDst);
|
||||
std::wstring sAuthor = sBookTitle;
|
||||
std::wstring sAnnotation, sKeywords, sDate;
|
||||
std::wstring sAnnotation, sKeywords;
|
||||
std::wstring sLanguage = L"en-EN", sVersion = L"1.0";
|
||||
std::wstring sIdentifier = GenerateUUID();
|
||||
XmlUtils::CXmlLiteReader oCoreReader;
|
||||
@ -1732,8 +1732,6 @@ HRESULT CFb2File::FromHtml(const std::wstring& sHtmlFile, const std::wstring& sC
|
||||
sIdentifier = oCoreReader.GetText2();
|
||||
else if (sName == L"dc:language")
|
||||
sLanguage = oCoreReader.GetText2();
|
||||
else if (sName == L"dcterms:created")
|
||||
sDate = oCoreReader.GetText2();
|
||||
else if (sName == L"cp:version")
|
||||
sVersion = oCoreReader.GetText2();
|
||||
}
|
||||
@ -1752,9 +1750,7 @@ HRESULT CFb2File::FromHtml(const std::wstring& sHtmlFile, const std::wstring& sC
|
||||
oDocument.WriteString(L"</lang></title-info><document-info><author><nickname>");
|
||||
// document-info
|
||||
oDocument.WriteString(sAuthor);
|
||||
oDocument.WriteString(L"</nickname></author><date>");
|
||||
oDocument.WriteString(sDate);
|
||||
oDocument.WriteString(L"</date><id>");
|
||||
oDocument.WriteString(L"</nickname></author><date></date><id>");
|
||||
oDocument.WriteString(sIdentifier);
|
||||
oDocument.WriteString(L"</id><version>");
|
||||
oDocument.WriteString(sVersion);
|
||||
|
||||
Reference in New Issue
Block a user