We amend or remove certain characters from files or values to help keep SWOOP secure.
Illegal Character Restrictions
The table below shows illegal character restrictions. This applies to both the attribute name and value. This should apply to attributes from all data sources (e.g. uploaded by user, default or retrieved from Viva Engage).
Unicode Character |
Example |
Rule |
How we handle it |
---|---|---|---|
Any character that is a letter or number |
a-z A-Z 0-9 |
Allowed |
Will keep this special character |
All unicodes from 128 and upwards |
Allowed |
Will keep this special character |
|
Apostrophe |
' |
Allowed |
Will keep this special character |
Plus |
+ |
Allowed |
Will keep this special character |
Forward slash |
/ |
Allowed |
Will keep this special character |
Dash |
- |
Allowed |
Will keep this special character |
Underscore |
_ |
Allowed |
Will keep this special character |
Ampersand |
& |
Allowed |
Will keep this special character |
At |
@ |
Allowed |
Will keep this special character |
Open Round Bracket |
( |
Allowed |
Will keep this special character |
Closing Round Bracket |
) |
Allowed |
Will keep this special character |
Anything else |
Example: < > $ ^ * # ~ % { } |
Remove |
Will be removed. |
Control Characters |
See: Control character. |
Remove |
Will be removed. |
Conversion Character Restrictions
The table below shows character restrictions that involve converting special characters to a legal option. This applies to both attribute name and value.
Unicode Character |
Example |
Rule |
How We Handle It |
---|---|---|---|
Open Square Bracket |
[ |
Convert to ( |
Will replace with open round bracket |
Closing Square Bracket |
] |
Convert to ) |
Will replace with closing round bracket |
Double Quote |
" |
Convert to ' |
Will replace with single quote |
Back Slash |
\ |
Convert to / |
Will replace forward slash |
Trailing Spaces |
A space at the beginning or end |
Trim |
Will be removed |
Normalisation
Normalisation should be applied to attribute names, not values. The process involves:
-
Capitalising the words;
-
Adding a space in-between CamelCase strings;
-
Removing double spaces;
-
And removing trailing spaces.
The processes will ignore strings that are entirely CAPITALISED, assuming they are acronyms. On the other hand, it will fix partial CAPITALisation, assuming it’s a mistake.
The following table will showcase some examples:
Before Normalisation |
After Normalisation |
Rule |
---|---|---|
“FirstName” |
“First Name” |
Split CamelCase |
“Last Name” |
“Last Name” |
Removed double spacing |
“ City “ |
“City” |
Removed trailing spaces |
“DOB“ |
“DOB” |
Ignored assuming acronym |
“DEPartment“ |
“Department” |
Restored to lowercase |
“διεύ θυνση” |
“Διεύ Θυνση” |
Capitalised words |
“naÇão” |
“Na Ção” |
Capitalised words; Split CamelCase |
“ cityAnd Location “ |
“City And Location” |
Removed trailing spaces; Capitalised words; Split CamelCase; Removed double spacing |
Examples of all Restrictions
The following table shows examples of how all restrictions will work together:
Before Changes |
After Changes |
Processes Order |
Process Rules |
---|---|---|---|
“SUB{\}urb” |
“Sub/Urb” |
Removed illegal characters; Replaced characters; Normalised |
Removed open curly bracket; removed closing curly bracket; replaced back slash with forward slash; capitalised words; lowercased word. |
“ cou%%^^ntry “ |
“Country” |
Removed illegal characters; Normalised |
Removed illegal characters % ^; capitalised words; trimmed trailing spaces |
“ç-alışm-a” |
“Ç-Alışm-A” |
Normalised |
Capitalised words. No removals or conversions necessary as dashes are allowed. |
“post%*[*COde]” |
“Post (Code)” |
Removed illegal characters; Replaced characters; Normalised |
Removed illegal characters % *; replaced open square bracket with open round bracket; replaced closing square bracket with closing round bracket; capitalised words; lowercased second word; added space before bracket. |
“Stra[ß]enname” |
“Stra(Ss)Enname” |
Replaced characters; Normalised |
Replaced open square bracket with open round bracket; replaced closing square bracket with closing round bracket; capitalised words. |
Comments
0 comments
Please sign in to leave a comment.