1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[js] add_bytes_to_string

This commit is contained in:
Witold Filipczyk 2022-06-19 13:49:59 +02:00
parent 67670c28a0
commit 5349d505c1
2 changed files with 4 additions and 4 deletions

View File

@ -676,7 +676,7 @@ walk_tree(struct string *buf, void *nod, bool start, bool toSortAttrs)
const auto textNode = dynamic_cast<const xmlpp::ContentNode*>(node); const auto textNode = dynamic_cast<const xmlpp::ContentNode*>(node);
if (textNode) { if (textNode) {
add_to_string(buf, textNode->get_content().c_str()); add_bytes_to_string(buf, textNode->get_content().c_str(), textNode->get_content().length());
} else { } else {
auto element = dynamic_cast<xmlpp::Element*>(node); auto element = dynamic_cast<xmlpp::Element*>(node);
@ -710,7 +710,7 @@ walk_tree_content(struct string *buf, xmlpp::Node *node)
const auto nodeText = dynamic_cast<const xmlpp::TextNode*>(node); const auto nodeText = dynamic_cast<const xmlpp::TextNode*>(node);
if (nodeText) { if (nodeText) {
add_to_string(buf, nodeText->get_content().c_str()); add_bytes_to_string(buf, nodeText->get_content().c_str(), nodeText->get_content().length());
} }
auto childs = node->get_children(); auto childs = node->get_children();

View File

@ -1638,7 +1638,7 @@ walk_tree(struct string *buf, void *nod, bool start, bool toSortAttrs)
const auto textNode = dynamic_cast<const xmlpp::ContentNode*>(node); const auto textNode = dynamic_cast<const xmlpp::ContentNode*>(node);
if (textNode) { if (textNode) {
add_to_string(buf, textNode->get_content().c_str()); add_bytes_to_string(buf, textNode->get_content().c_str(), textNode->get_content().length());
} else { } else {
auto element = dynamic_cast<xmlpp::Element*>(node); auto element = dynamic_cast<xmlpp::Element*>(node);
@ -1672,7 +1672,7 @@ walk_tree_content(struct string *buf, xmlpp::Node *node)
const auto nodeText = dynamic_cast<const xmlpp::TextNode*>(node); const auto nodeText = dynamic_cast<const xmlpp::TextNode*>(node);
if (nodeText) { if (nodeText) {
add_to_string(buf, nodeText->get_content().c_str()); add_bytes_to_string(buf, nodeText->get_content().c_str(), nodeText->get_content().length());
} }
auto childs = node->get_children(); auto childs = node->get_children();