diff options
Diffstat (limited to 'library/cpp/html/pcdata/pcdata.cpp')
| -rw-r--r-- | library/cpp/html/pcdata/pcdata.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/html/pcdata/pcdata.cpp b/library/cpp/html/pcdata/pcdata.cpp index 740c240fd23..70fe073bb99 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[] = {""", "<", ">", "'", "'", "&", "'", nullptr}; const char chars[] = {'\"', '<', '>', '\'', '\'', '&', '\''}; for (size_t i = 0; i < sz.length(); ++i) { |
