diff options
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/fastserializer.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index 77ed2b29c3d5..c3da14b3453d 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -465,8 +465,12 @@ namespace sax_fastparser { const char* pAttributeValue = rAttrList.getFastAttributeValue(j); - // tdf#127274 don't escape the special VML shape type id "#_x0000_t202" - bool bEscape = !(pAttributeValue && strcmp(pAttributeValue, "#_x0000_t202") == 0); + // tdf#117274 don't escape the special VML shape type id "#_x0000_t202" + bool bEscape = !(pAttributeValue + && *pAttributeValue != '\0' + && (*pAttributeValue == '#' + ? strncmp(pAttributeValue, "#_x0000_t", 9) == 0 + : strncmp(pAttributeValue, "_x0000_t", 8) == 0)); write(pAttributeValue, rAttrList.AttributeValueLength(j), bEscape); |