Changeset 58d285a
- Timestamp:
- 2016-10-03T00:56:35Z (8 years ago)
- Branches:
- master
- Children:
- 01d56c0
- Parents:
- 82e55d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_lib.c
r82e55d2 r58d285a 587 587 #endif 588 588 589 static void expand_entities(char **text, const json_value *node );589 static void expand_entities(char **text, const json_value *node, const json_value *extended_node); 590 590 591 591 /** … … 602 602 const json_value *rt = NULL; 603 603 const json_value *text_value = NULL; 604 const json_value *extended_node = NULL; 604 605 605 606 if (node->type != json_object) { … … 615 616 } else if (strcmp("extended_tweet", k) == 0 && v->type == json_object) { 616 617 text_value = json_o_get(v, "full_text"); 618 extended_node = v; 617 619 } else if (strcmp("retweeted_status", k) == 0 && v->type == json_object) { 618 620 rt = v; … … 647 649 txs->text = g_memdup(text_value->u.string.ptr, text_value->u.string.length + 1); 648 650 strip_html(txs->text); 649 expand_entities(&txs->text, node );651 expand_entities(&txs->text, node, extended_node); 650 652 } 651 653 … … 690 692 } 691 693 692 expand_entities(&txs->text, node );694 expand_entities(&txs->text, node, NULL); 693 695 694 696 if (txs->text && txs->user && txs->id) { … … 700 702 } 701 703 702 static void expand_entities(char **text, const json_value *node )703 { 704 json_value *entities, * quoted;704 static void expand_entities(char **text, const json_value *node, const json_value *extended_node) 705 { 706 json_value *entities, *extended_entities, *quoted; 705 707 char *quote_url = NULL, *quote_text = NULL; 706 708 … … 718 720 } else { 719 721 quoted = NULL; 722 } 723 724 if (extended_node) { 725 extended_entities = json_o_get(extended_node, "entities"); 726 if (extended_entities && extended_entities->type == json_object) { 727 entities = extended_entities; 728 } 720 729 } 721 730
Note: See TracChangeset
for help on using the changeset viewer.