diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-09-05 19:50:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 19:50:43 +0200 |
commit | 3c9c1d909476896b16ba750090f042e7824b50b2 (patch) | |
tree | bdddf72f0cce5b1b309bb61fc60a7f0bf77d8bb1 /storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp | |
parent | b81ed9944fd93513b18c48f8fc84d9aeec8615a5 (diff) | |
parent | 506f285043535af5d81fd098dfd28166930704e5 (diff) |
Merge pull request #23934 from vespa-engine/vekterli/factor-out-xml-string-escapingv8.48.22
Factor out XML string escaping and use for internal legacy status pages [run-systemtest]
Diffstat (limited to 'storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp')
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index 1c818233746..1c245d9c38e 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -14,12 +14,15 @@ #include <vespa/storageapi/message/stat.h> #include <vespa/vespalib/stllike/hash_map.hpp> #include <vespa/vespalib/util/exceptions.h> +#include <vespa/vespalib/util/string_escape.h> #include <xxhash.h> #include <vespa/log/log.h> LOG_SETUP(".persistence.filestor.handler.impl"); using document::BucketSpace; +using vespalib::xml_attribute_escaped; +using vespalib::xml_content_escaped; namespace storage { @@ -1338,8 +1341,8 @@ FileStorHandlerImpl::Stripe::dumpQueueHtml(std::ostream & os) const const PriorityIdx& idx = bmi::get<1>(*_queue); for (const auto & entry : idx) { - os << "<li>" << entry._command->toString() << " (priority: " - << (int)entry._command->getPriority() << ")</li>\n"; + os << "<li>" << xml_content_escaped(entry._command->toString()) << " (priority: " + << static_cast<int>(entry._command->getPriority()) << ")</li>\n"; } } @@ -1379,8 +1382,9 @@ FileStorHandlerImpl::Stripe::dumpQueue(std::ostream & os) const const PriorityIdx& idx = bmi::get<1>(*_queue); for (const auto & entry : idx) { - os << entry._bucket.getBucketId() << ": " << entry._command->toString() << " (priority: " - << (int)entry._command->getPriority() << ")\n"; + os << entry._bucket.getBucketId() << ": " + << xml_content_escaped(entry._command->toString()) + << " (priority: " << static_cast<int>(entry._command->getPriority()) << ")\n"; } } |