Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-05-29 14:11:50 +0200
committerMartin Hořeňovský2021-05-29 14:11:50 +0200
commit0221148ac36ef88dce2fcc49a4fce78fed14ddb4 (patch)
treebfa17c205329b20e62bab54ef0c96d42a0e85ed9 /src/catch2/internal
parent9f091cbe9d9060f4241fb611486a1fbb8c552fc3 (diff)
downloadcatch3-0221148ac36ef88dce2fcc49a4fce78fed14ddb4.tar.gz
Cleanup string escaping in XmlWriter with raw string literals
Diffstat (limited to 'src/catch2/internal')
-rw-r--r--src/catch2/internal/catch_xmlwriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_xmlwriter.cpp b/src/catch2/internal/catch_xmlwriter.cpp
index 80ff4108..f8e18240 100644
--- a/src/catch2/internal/catch_xmlwriter.cpp
+++ b/src/catch2/internal/catch_xmlwriter.cpp
@@ -302,7 +302,7 @@ namespace {
}
void XmlWriter::writeStylesheetRef( std::string const& url ) {
- m_os << "<?xml-stylesheet type=\"text/xsl\" href=\"" << url << "\"?>\n";
+ m_os << R"(<?xml-stylesheet type="text/xsl" href=")" << url << R"("?>)" << '\n';
}
XmlWriter& XmlWriter::writeBlankLine() {
@@ -324,7 +324,7 @@ namespace {
}
void XmlWriter::writeDeclaration() {
- m_os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ m_os << R"(<?xml version="1.0" encoding="UTF-8"?>)" << '\n';
}
void XmlWriter::newlineIfNecessary() {