Support Article
Extra Space inbetween a string is trimmed
SA-3418
Summary
When I key in some string values into a Input Box like 'asd qwe' while saving into database the extra space between the strings 3 space here is trimmed to one space like 'asd qwe'.
Error Messages
NA
Steps to Reproduce
Key in some string values into a Input Box like 'asd qwe' while saving into database the extra space between the strings 3 space here is trimmed to one space like 'asd qwe'.
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules. Multiple spaces btw 2 strings given for a property value gets trimmed to one space. The property value is stored with multiple spaces in Database, but when it is viewed using any of the HTML rules, the spaces are not visible. This is because the HTML will allow multiple spaces only if <pre> tag is used.
Resolution
As <pre> tag is not working in this case, we have edited the property value by replacing all the spaces with ASCII character of space( ), "\u0A00". And the user uses a validation which will not allow any other characters which are not in swift character set for the property value. So, for this to work, the validation is also edited, so as to allow the "\u0A00" character in property value, by including the ASCII value 160 for space in validation.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.