This commit is contained in:
Elena.Subbotina
2021-09-16 19:08:03 +03:00
parent c886e0da68
commit 76f94eaacc
2 changed files with 3 additions and 3 deletions

View File

@ -630,8 +630,8 @@ namespace DocFileFormat
d = (int)_writeTocLink.find(L" ");
_writeTocLink = _writeTocLink.substr(0, d);
_writeAfterRun = std::wstring (L"<w:hyperlink w:anchor = \"");
_writeAfterRun += _writeTocLink;
_writeAfterRun = std::wstring (L"<w:hyperlink w:anchor=\"");
_writeAfterRun += XmlUtils::EncodeXmlString(_writeTocLink);
_writeAfterRun += std::wstring (L"\" w:history=\"1\">");
break;

View File

@ -1380,7 +1380,7 @@ private:
if(nSharp == std::wstring::npos)
oXml->WriteString(NSFile::GetFileName(sRef));
else
oXml->WriteString(sRef.c_str() + nSharp + 1);
oXml->WriteEncodeXmlString(sRef.c_str() + nSharp + 1);
}
// Внешняя ссылка
else