summaryrefslogtreecommitdiff
path: root/indra/llui/lltextvalidate.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-09-01 18:35:23 +0800
committerErik Kundiman <erik@megapahit.org>2026-09-04 21:58:53 +0800
commit00bb3bb6f07660bd914d29a1389342bb3060d254 (patch)
tree431f574922494d2201718f13085f17bc6bd7fb42 /indra/llui/lltextvalidate.cpp
parenta8636720129952c10cf49ab80da21bf8b340b96c (diff)
parent4ef9f8f14b35ed388c294d53767a0dca0e890924 (diff)
Merge remote-tracking branch 'secondlife/release/26.4' into 26.4
Diffstat (limited to 'indra/llui/lltextvalidate.cpp')
-rw-r--r--indra/llui/lltextvalidate.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llui/lltextvalidate.cpp b/indra/llui/lltextvalidate.cpp
index 9a087d8230..1f2e7e65db 100644
--- a/indra/llui/lltextvalidate.cpp
+++ b/indra/llui/lltextvalidate.cpp
@@ -434,7 +434,7 @@ public:
} validatorASCIINoLeadingSpaceImpl;
Validator validateASCIINoLeadingSpace(validatorASCIINoLeadingSpaceImpl);
-class ValidatorASCIIWithNewLine : public ValidatorImpl
+class ValidatorASCIIWithNewLineNoPipe : public ValidatorImpl
{
// Used for multiline text stored on the server.
// Example is landmark description in Places SP.
@@ -446,9 +446,9 @@ class ValidatorASCIIWithNewLine : public ValidatorImpl
{
CHAR ch = str[len];
- if ((ch < 0x20 && ch != 0xA) || ch > 0x7f)
+ if ((ch < 0x20 && ch != 0xA) || ch > 0x7f || ch == '|')
{
- return setError("Validator_ShouldBeNewLineOrASCII", LLSD().with("NR", len + 1).with("CH", llsd(ch)));
+ return setError("Validator_ShouldBeNewLineOrASCIINoPipe", LLSD().with("NR", len + 1).with("CH", llsd(ch)));
}
}
@@ -458,8 +458,8 @@ class ValidatorASCIIWithNewLine : public ValidatorImpl
public:
/*virtual*/ bool validate(const std::string& str) override { return validate<char>(str); }
/*virtual*/ bool validate(const LLWString& str) override { return validate<llwchar>(str); }
-} validatorASCIIWithNewLineImpl;
-Validator validateASCIIWithNewLine(validatorASCIIWithNewLineImpl);
+} validatorASCIIWithNewLineNoPipeImpl;
+Validator validateASCIIWithNewLineNoPipe(validatorASCIIWithNewLineNoPipeImpl);
void Validators::declareValues()
{
@@ -472,7 +472,7 @@ void Validators::declareValues()
declare("alpha_num_space", validateAlphaNumSpace);
declare("ascii_printable_no_pipe", validateASCIIPrintableNoPipe);
declare("ascii_printable_no_space", validateASCIIPrintableNoSpace);
- declare("ascii_with_newline", validateASCIIWithNewLine);
+ declare("ascii_with_newline_no_pipe", validateASCIIWithNewLineNoPipe);
}
} // namespace LLTextValidate