aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/html/pcdata/pcdata.cpp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/html/pcdata/pcdata.cpp
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
downloadydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/html/pcdata/pcdata.cpp')
-rw-r--r--library/cpp/html/pcdata/pcdata.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/html/pcdata/pcdata.cpp b/library/cpp/html/pcdata/pcdata.cpp
index 70fe073bb9..740c240fd2 100644
--- a/library/cpp/html/pcdata/pcdata.cpp
+++ b/library/cpp/html/pcdata/pcdata.cpp
@@ -1,10 +1,10 @@
#include "pcdata.h"
-#include <util/string/strspn.h>
-
+#include <util/string/strspn.h>
+
static TCompactStrSpn sspn("\"<>&'");
-static void EncodeHtmlPcdataAppendInternal(const TStringBuf str, TString& strout, bool qAmp) {
+static void EncodeHtmlPcdataAppendInternal(const TStringBuf str, TString& strout, bool qAmp) {
const char* s = str.data();
const char* e = s + str.length();
@@ -49,18 +49,18 @@ static void EncodeHtmlPcdataAppendInternal(const TStringBuf str, TString& strout
}
}
-void EncodeHtmlPcdataAppend(const TStringBuf str, TString& strout) {
+void EncodeHtmlPcdataAppend(const TStringBuf str, TString& strout) {
EncodeHtmlPcdataAppendInternal(str, strout, true);
}
-TString EncodeHtmlPcdata(const TStringBuf str, bool qAmp) {
- TString strout;
+TString EncodeHtmlPcdata(const TStringBuf str, bool qAmp) {
+ TString strout;
EncodeHtmlPcdataAppendInternal(str, strout, qAmp);
return strout;
}
-TString DecodeHtmlPcdata(const TString& sz) {
- TString res;
+TString DecodeHtmlPcdata(const TString& sz) {
+ TString res;
const char* codes[] = {"&quot;", "&lt;", "&gt;", "&#39;", "&#039;", "&amp;", "&apos;", nullptr};
const char chars[] = {'\"', '<', '>', '\'', '\'', '&', '\''};
for (size_t i = 0; i < sz.length(); ++i) {