Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

URL-Safe Conversion

Featured Replies

Another thread got me to thinking about the problem of translating source text from Filemaker into truly "safe" URL encoding. Using online references about the characters that need to be escaped, I came up with the following long but simple function.

It takes care of just about any character that could be misinterpreted by an outside program in a URL--at least those I could find when I dredged online for URL encoding specifications. The only exception made here was for the space character.

Usage is simple: just feed text into the function, and all possibly suspicious characters will be changed to their hexcode equivalents. I have not tested it in all situations, but initial test show it to work in Windows with Pegasus mail.

Any improvements are welcome!

Function URLEscape(Src)

---------------------------------------

Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute( Substitute(Src; "%"; "%25"); "$"; "%24"); "#"; "%23"); "&"; "%26"); "/"; "%2F"); ":"; "%3A"); "; "; "%3B"); "<"; "%3C"); "="; "%3D"); ">"; "%3E"); "?"; "%3F"); "@"; "%40"); "["; "%5B"); ""; "%5C"); "]"; "%5D"); "^"; "%5E"); "`"; "%60"); "{"; "%7B"); "|"; "%7C"); "}"; "%7D"); "~"; "%7E"); "¶"; "%0D%0A"); "!"; "%21"); """; "%22"); "("; "%28"); ")"; "%29"); "'"; "%27"); ","; "%2C"); "*"; "%2A")

Nested substitutes are not required in version 7. You can write your function much more conveniently as:

Substitute ( Src ;

[ "%" ; "%25" ] ;

[ "$" ; "%24" ] ;

[ "#" ; "%23" ] ;

[ "&" ; "%26" ] ;

[ "/" ; "%2F" ] ;

[ ":" ; "%3A" ] ;

[ ";" ; "%3B" ] ;

[ "<" ; "%3C" ] ;

[ "=" ; "%3D" ] ;

[ ">" ; "%3E" ] ;

[ "?" ; "%3F" ] ;

[ "@" ; "%40" ] ;

[ "[" ; "%5B" ] ;

[ "" ; "%5C" ] ;

[ "]" ; "%5D" ] ;

[ "^" ; "%5E" ] ;

[ "`" ; "%60" ] ;

[ "{" ; "%7B" ] ;

[ "|" ; "%7C" ] ;

[ "}" ; "%7D" ] ;

[ "~" ; "%7E" ] ;

[ "¶" ; "%0D%0A" ] ;

[ "!" ; "%21" ] ;

[ """ ; "%22" ] ;

[ "(" ; "%28" ] ;

[ ")" ; "%29" ] ;

[ "'" ; "%27" ] ;

[ "," ; "%2C" ] ;

[ "*" ; "%2A" ]

)

  • Author

Comment--

Thanks!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.