Fix special characters handling in wxSVGFileDC::DrawText().
Special XML characters need to be quoted before being saved in an SVG file (which is also an XML file). Closes #15602. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -572,6 +572,7 @@ All:
|
||||
All (GUI):
|
||||
|
||||
- Fix wxListEvent::GetData() in LLP64 builds.
|
||||
- Fix special characters handling in wxSVGFileDC::DrawText() (Ludovic Aubert).
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@@ -27,6 +27,8 @@
|
||||
#include "wx/wfstream.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
#include "wx/private/markupparser.h"
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Global utilities
|
||||
// ----------------------------------------------------------
|
||||
@@ -293,7 +295,7 @@ void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoor
|
||||
//text will be solid, unless alpha value isn't opaque in the foreground colour
|
||||
s += wxBrushString(m_textForegroundColour) + wxPenString(m_textForegroundColour);
|
||||
sTmp.Printf ( wxT("stroke-width:0;\" transform=\"rotate( %s %d %d ) \" >"), NumStr(-angle), x,y );
|
||||
s += sTmp + sText + wxT("</text> ") + wxT("\n");
|
||||
s += sTmp + wxMarkupParser::Quote(sText) + wxT("</text> ") + wxT("\n");
|
||||
if (m_OK)
|
||||
{
|
||||
write(s);
|
||||
|
Reference in New Issue
Block a user