diff options
author | socialgraph <socialgraph@yandex-team.com> | 2022-09-11 21:01:07 +0300 |
---|---|---|
committer | socialgraph <socialgraph@yandex-team.com> | 2022-09-11 21:01:07 +0300 |
commit | f6f95427f2d96542fe7333fb9e7a44d0f4b3e595 (patch) | |
tree | 45e7334ef871a818489e62d103281eaea541304d /library/cpp/uri/encode.cpp | |
parent | eb1b0261b7cff8093f5d63c6fd0f9b12f94196cf (diff) | |
download | ydb-f6f95427f2d96542fe7333fb9e7a44d0f4b3e595.tar.gz |
test canonize with hash bang
test hash bang
Diffstat (limited to 'library/cpp/uri/encode.cpp')
-rw-r--r-- | library/cpp/uri/encode.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/cpp/uri/encode.cpp b/library/cpp/uri/encode.cpp index 27ed750324..e62255c675 100644 --- a/library/cpp/uri/encode.cpp +++ b/library/cpp/uri/encode.cpp @@ -205,15 +205,16 @@ namespace NUri { bool escapepct = false; if (0 < res) // definitely encode - escapepct = FldDst.Enabled(); + escapepct = FldDst.Enabled() && !FldDst.Is(TField::FieldHashBang); else if (0 != res || !FldDst.Enabled() || !FldDst.Encode(ch)) { Out << ch; return; } Out << '%'; - if (escapepct) + if (escapepct) { Out.Write("25", 2); // '%' + } Hex(Out, ch); } } |