diff --git a/Common/3dParty/html/htmltoxhtml.h b/Common/3dParty/html/htmltoxhtml.h
index 6076fa6004..04cb2713f4 100644
--- a/Common/3dParty/html/htmltoxhtml.h
+++ b/Common/3dParty/html/htmltoxhtml.h
@@ -40,7 +40,7 @@ static std::wstring htmlToXhtml(std::string& sFileContent, bool bNeedConvert)
// Распознование кодировки
if (bNeedConvert)
{
- std::string sEncoding = NSStringFinder::FindPropety(sFileContent, "charset", "\"", "\"");
+ std::string sEncoding = NSStringFinder::FindPropety(sFileContent, "charset", {"\"", "="}, {"\"", " "}, 0);
if (sEncoding.empty())
sEncoding = NSStringFinder::FindPropety(sFileContent, "encoding", "\"", "\"");
@@ -360,7 +360,7 @@ static std::string mhtTohtml(std::string& sFileContent)
// Цикл по boundary
while(nFound != std::string::npos)
{
- nFoundEnd = sFileContent.find(sBoundary + "--", nFound + nBoundaryLength);
+ nFoundEnd = sFileContent.find(sBoundary, nFound + nBoundaryLength);
if(nFoundEnd == std::string::npos)
break;
diff --git a/HtmlFile2/HtmlFile2.pro b/HtmlFile2/HtmlFile2.pro
index 96ea48deaf..a246410bc2 100644
--- a/HtmlFile2/HtmlFile2.pro
+++ b/HtmlFile2/HtmlFile2.pro
@@ -27,8 +27,7 @@ include($$CORE_ROOT_DIR/Common/3dParty/boost/boost.pri)
ADD_DEPENDENCY(kernel, UnicodeConverter, graphics, kernel_network)
-SOURCES += htmlfile2.cpp \
- ./src/StringFinder.cpp
+SOURCES += htmlfile2.cpp
HEADERS += htmlfile2.h \
./src/StringFinder.h
diff --git a/HtmlFile2/htmlfile2.cpp b/HtmlFile2/htmlfile2.cpp
index 522426dc7f..81b5df6b1d 100644
--- a/HtmlFile2/htmlfile2.cpp
+++ b/HtmlFile2/htmlfile2.cpp
@@ -960,11 +960,11 @@ private:
readStream(oXml, sSelectors, oTSR);
}
// Векторная картинка
- else if(sName == L"svg" || (sName.length() > 3 && sName.compare(sName.length() - 3, 3, L"svg") == 0))
- {
- wrP(oXml, sSelectors, oTS);
- readSVG(oXml);
- }
+// else if(sName == L"svg" || (sName.length() > 3 && sName.compare(sName.length() - 3, 3, L"svg") == 0))
+// {
+// wrP(oXml, sSelectors, oTS);
+// readSVG(oXml);
+// }
else if(sName == L"input")
readInput(oXml, sSelectors, oTS);
// Игнорируются тэги выполняющие скрипт
@@ -1100,9 +1100,15 @@ private:
oTSP.sPStyle += L"";
readStream(oXml, sSelectors, oTSP);
}
+ else if (sName == L"xml")
+ {
+ sSelectors.pop_back();
+ return;
+ }
// Неизвестный тэг. Выделять ли его абзацем?
else
readStream(oXml, sSelectors, oTS);
+
readNote(oXml, sSelectors, sNote);
sNote = L"";