From 6a61d7e25f5408e2b9c966070bc5a5886c41641f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Sat, 6 Jun 2026 00:01:19 +0300 Subject: p575 Unify description field --- indra/llui/lltextvalidate.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llui/lltextvalidate.cpp') 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(str); } /*virtual*/ bool validate(const LLWString& str) override { return validate(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 -- cgit v1.3