Remove newline and whitespace from values

Avatar

Avatar

adamhaining

Avatar

adamhaining

adamhaining

25-04-2013

Occassionally data will be sent in where there is a space on the end, a tab somewhere in the value, or even a newline character.  This causes a value to appear normal in SiteCatalyst when in reality it is not.  If it were consistent, it would be fine, but sometimes it is a matter of how a browser interprets and encodes data.  This then causes 2 lines to appear in SiteCatalyst that appear the same.  To find this out I have to export as a CSV and then open in a text editor to find the problem.

 

My request is that any of these whitespace type characters be removed from data as it comes in.  This can include double spaces, tabs, newlines, and anything else that may be encountered.  This would be easy to group these values together.

 

I've code it coded now to fix this, but it seems like an unnecessary step.  Another possibility is having it handled in the JS code so the servers don't have to process this.

Comment