MCPcopy Create free account
hub / github.com/FastLED/FastLED / escapeXml

Method escapeXml

src/fl/test/fltest.cpp.hpp:597–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595// =============================================================================
596
597fl::string XMLReporter::escapeXml(const char* text) FL_NOEXCEPT {
598 if (!text) return fl::string();
599
600 fl::string result;
601 for (const char* p = text; *p; ++p) {
602 switch (*p) {
603 case '&': result += "&"; break;
604 case '<': result += "&lt;"; break;
605 case '>': result += "&gt;"; break;
606 case '"': result += "&quot;"; break;
607 case '\'': result += "&apos;"; break;
608 default: result += *p; break;
609 }
610 }
611 return result;
612}
613
614void XMLReporter::testRunStart() FL_NOEXCEPT {
615 mTestCaseResults.clear();

Callers

nothing calls this directly

Calls 1

stringClass · 0.50

Tested by

no test coverage detected