Sanitize URL

Dan Ridinger dlr at futurechalk.com
Thu Feb 3 19:24:51 UTC 2022


Hello,

You could use something like this:

# Launder Column names
#
Calculate L_COLUMN_VALUE as replaceall(L_COLUMN_VALUE,'"','') ## Remove double quote marks
Calculate L_COLUMN_VALUE as replaceall(L_COLUMN_VALUE,'/','') ## Remove / causes code failure on the DO command
Calculate L_COLUMN_VALUE as replaceall(L_COLUMN_VALUE,'-','') ## Remove - causes code failure on the DO command
Calculate L_COLUMN_VALUE as replaceall(L_COLUMN_VALUE,'.','') ## Remove . causes code failure on the DO command
Calculate L_COLUMN_VALUE as trim(L_COLUMN_VALUE) ## Remove leading and trailing spaces

Not elegant but it works.

Dan Ridinger
Managing Director




FutureChalk Software Inc.			
20521 92A Avenue						
Langley, BC  V1M 1B7
					
Phone No: 604.723.6837
EMail: dlr at futurechalk.com
www: www.futurechalk.com

> On Feb 3, 2022, at 1:52 AM, IT <it at plastipol.com> wrote:
> 
> Hi folks
> 
> I need to calculate a url concatenating text from fields. I need to sanitize the generated url removing unwanted characters like ‘/‘, accented characters, and other forbidden characters.
> 
> Is there in Omnis an easy way, or I must to write my own function for sanitize urls?
> 
> regards
> 
> xavier
> 
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list