Commit bf6bfce0 authored by ElenaSubbotina's avatar ElenaSubbotina

fix bug 34509

parent 805c24ff
......@@ -111,7 +111,13 @@ namespace PPTX
XmlUtils::CAttribute oAttr;
oAttr.Write(_T("id"), id);
oAttr.Write(_T("name"), XmlUtils::EncodeXmlString(name));
if (descr.IsInit()) oAttr.Write(_T("descr"), XmlUtils::EncodeXmlString(descr.get()));
if (descr.IsInit())
{
std::wstring d = XmlUtils::EncodeXmlString(descr.get());
XmlUtils::replace_all(d, L"\n", L"
");
oAttr.Write(_T("descr"), d);
}
oAttr.Write(_T("hidden"), hidden);
if (title.IsInit()) oAttr.Write(_T("title"), XmlUtils::EncodeXmlString(title.get()));
......@@ -157,7 +163,12 @@ namespace PPTX
pWriter->StartAttributes();
pWriter->WriteAttribute (_T("id"), _id);
pWriter->WriteAttribute (_T("name"), XmlUtils::EncodeXmlString(name));
if (descr.IsInit()) pWriter->WriteAttribute (_T("descr"), XmlUtils::EncodeXmlString(descr.get()));
if (descr.IsInit())
{
std::wstring d = XmlUtils::EncodeXmlString(descr.get());
XmlUtils::replace_all(d, L"\n", L"
");
pWriter->WriteAttribute (_T("descr"), d);
}
pWriter->WriteAttribute (_T("hidden"), hidden);
if (title.IsInit()) pWriter->WriteAttribute (_T("title"), XmlUtils::EncodeXmlString(title.get()));
......
......@@ -176,7 +176,9 @@ namespace OOX
if ( m_sDescr.IsInit() )
{
sResult += _T("descr=\"");
sResult += m_sDescr.get2();
std::wstring d = XmlUtils::EncodeXmlString(m_sDescr.get());
XmlUtils::replace_all(d, L"\n", L"
");
sResult += d;
sResult += _T("\" ");
}
if ( m_oHidden.IsInit() ) sResult += _T("hidden=\"") + m_oHidden->ToString() + _T("\" ");
......
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