Lines 98-103
Link Here
|
98 |
WBXMLTree *tree; /**< WBXML Tree to Encode */ |
98 |
WBXMLTree *tree; /**< WBXML Tree to Encode */ |
99 |
WBXMLBuffer *output; /**< The output (wbxml or xml) we are producing */ |
99 |
WBXMLBuffer *output; /**< The output (wbxml or xml) we are producing */ |
100 |
const WBXMLTagEntry *current_tag; /**< Current Tag (See The Warning For This Field !) */ |
100 |
const WBXMLTagEntry *current_tag; /**< Current Tag (See The Warning For This Field !) */ |
|
|
101 |
const WBXMLTreeNode *current_text_parent; /**< Parent of the current Node (Used for DRM REL) */ |
101 |
const WBXMLAttrEntry *current_attr; /**< Current Attribute */ |
102 |
const WBXMLAttrEntry *current_attr; /**< Current Attribute */ |
102 |
WB_UTINY tagCodePage; /**< Current Tag Code Page */ |
103 |
WB_UTINY tagCodePage; /**< Current Tag Code Page */ |
103 |
WB_UTINY attrCodePage; /**< Current Attribute Code Page */ |
104 |
WB_UTINY attrCodePage; /**< Current Attribute Code Page */ |
Lines 335-340
Link Here
|
335 |
encoder->output = NULL; |
336 |
encoder->output = NULL; |
336 |
|
337 |
|
337 |
encoder->current_tag = NULL; |
338 |
encoder->current_tag = NULL; |
|
|
339 |
encoder->current_text_parent = NULL; |
338 |
encoder->current_attr = NULL; |
340 |
encoder->current_attr = NULL; |
339 |
|
341 |
|
340 |
encoder->tagCodePage = 0; |
342 |
encoder->tagCodePage = 0; |
Lines 831-836
Link Here
|
831 |
*/ |
833 |
*/ |
832 |
static WBXMLError parse_text(WBXMLEncoder *encoder, WBXMLTreeNode *node) |
834 |
static WBXMLError parse_text(WBXMLEncoder *encoder, WBXMLTreeNode *node) |
833 |
{ |
835 |
{ |
|
|
836 |
WBXMLError ret; |
837 |
|
834 |
/* Do not modify text inside a CDATA section */ |
838 |
/* Do not modify text inside a CDATA section */ |
835 |
if (!encoder->in_cdata) { |
839 |
if (!encoder->in_cdata) { |
836 |
/* If Canonical Form: "Ignorable white space is considered significant and is treated equivalently to data" */ |
840 |
/* If Canonical Form: "Ignorable white space is considered significant and is treated equivalently to data" */ |
Lines 877-883
Link Here
|
877 |
} |
881 |
} |
878 |
else { |
882 |
else { |
879 |
/* Encode text */ |
883 |
/* Encode text */ |
880 |
return wbxml_encode_value_element_buffer(encoder, wbxml_buffer_get_cstr(node->content), WBXML_VALUE_ELEMENT_CTX_CONTENT); |
884 |
encoder->current_text_parent = node->parent; |
|
|
885 |
ret = wbxml_encode_value_element_buffer(encoder, wbxml_buffer_get_cstr(node->content), WBXML_VALUE_ELEMENT_CTX_CONTENT); |
886 |
encoder->current_text_parent = NULL; |
887 |
return ret; |
881 |
} |
888 |
} |
882 |
case WBXML_ENCODER_OUTPUT_XML: |
889 |
case WBXML_ENCODER_OUTPUT_XML: |
883 |
return xml_encode_text(encoder, node->content); |
890 |
return xml_encode_text(encoder, node->content); |
Lines 2650-2660
Link Here
|
2650 |
{ |
2657 |
{ |
2651 |
WB_UTINY *data = NULL; |
2658 |
WB_UTINY *data = NULL; |
2652 |
WB_LONG data_len = 0; |
2659 |
WB_LONG data_len = 0; |
|
|
2660 |
WBXMLTagEntry *current_tag = NULL; |
2653 |
|
2661 |
|
2654 |
if (encoder->current_tag != NULL) |
2662 |
if ((encoder->current_text_parent != NULL) && |
|
|
2663 |
(encoder->current_text_parent->name != NULL) && |
2664 |
(encoder->current_text_parent->name->type == WBXML_VALUE_TOKEN)) |
2665 |
{ |
2666 |
current_tag = encoder->current_text_parent->name->u.token; |
2667 |
} |
2668 |
|
2669 |
if (current_tag != NULL) |
2655 |
{ |
2670 |
{ |
2656 |
if ((encoder->current_tag->wbxmlCodePage == 0x00) && |
2671 |
if ((current_tag->wbxmlCodePage == 0x00) && |
2657 |
(encoder->current_tag->wbxmlToken == 0x0C)) |
2672 |
(current_tag->wbxmlToken == 0x0C)) |
2658 |
{ |
2673 |
{ |
2659 |
/* <ds:KeyValue> content: "Encoded in binary format, i.e., no base64 encoding" */ |
2674 |
/* <ds:KeyValue> content: "Encoded in binary format, i.e., no base64 encoding" */ |
2660 |
|
2675 |
|