# Encode text or substitute

**URL:** <https://community.glideapps.com/t/encode-text-or-substitute/27352>\
**Category:** Ask for Help\
**Created:** [May 28, 2021, 2:06pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352 "2021-05-28T14:06:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)\
**Post date:** [May 28, 2021, 2:06pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/1 "2021-05-28T14:06:57Z")

</div>

Hi Gliders,

I was wondering if any of you has an idea how to encode text or alternatively use something like the substitute function but within the glide editor?

I have a need where I need to use a string of text within a url but I can’t use the glide construct url column as it doesn’t fit the structure of the url and I would very much like to avoid writing to the sheet for this as it creates a delay in the flow.

Appreciate any inputs you might have.

Thanks

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [May 28, 2021, 2:11pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/2 "2021-05-28T14:11:18Z")

</div>

@yinon_raviv can you give an example of the url you’re trying to create and what to exchange in the url

---

<div class="post-metadata">

**Author:** ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)\
**Post date:** [May 28, 2021, 2:42pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/3 "2021-05-28T14:42:54Z")

</div>

I’m trying to create an image with text overlay in cloudinary (which works using sheets function).  
In order to do this I need to encode the text as well as replace some characters such as comma which breaks the cloudinary link (as comma used for the setting of the cloudinary transformation)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 28, 2021, 2:48pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/4 "2021-05-28T14:48:21Z")

</div>

Might be possible with a template column, replacing spaces with %20, etc. But you’d need to know the full set of characters that need to be replaced

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [May 28, 2021, 2:52pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/5 "2021-05-28T14:52:30Z")

</div>

@yinon_raviv if you give an example of what you want to achieve then it is easier for people to give some advise 😜

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 28, 2021, 2:52pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/6 "2021-05-28T14:52:32Z")

</div>

Actually, just had a thought - you might be able to do it with a URL column and a template column. Leverage the URL column to do the encoding, and then run the URL column through a template to strip out the bits you don’t need?

---

<div class="post-metadata">

**Author:** ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)\
**Post date:** [May 28, 2021, 2:53pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/7 "2021-05-28T14:53:54Z")

</div>

Way to go

---

<div class="post-metadata">

**Author:** ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)\
**Post date:** [May 28, 2021, 3:00pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/8 "2021-05-28T15:00:59Z")

</div>

Glide URL column is perfect for working with Cloudinary.

---

<div class="post-metadata">

**Author:** ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)\
**Post date:** [May 28, 2021, 3:30pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/9 "2021-05-28T15:30:50Z")

</div>

That’s the problem, it’s a dynamic text the users entering.  
Don’t have any way to know this in advance

---

<div class="post-metadata">

**Author:** ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)\
**Post date:** [May 28, 2021, 3:32pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/10 "2021-05-28T15:32:01Z")

</div>

The url column needs all the or most parameters fills in order to work so didn’t work but I’ll try again to see if there might be a different way to use it

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 28, 2021, 3:39pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/11 "2021-05-28T15:39:58Z")

</div>

Actually, I just did a test and it works fine with just a URL column.

- Protocol: https
- Host: [res.cloudinary.com](http://res.cloudinary.com)
- Path: _EVERYTHING ELSE_
- Query Parameters: Leave Blank

PS. Just to be clear, I tested using a complex URL with multiple text and image overlays that won’t work without being URL encoded - and it worked perfectly using the above.

---

<div class="post-metadata">

**Author:** ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)\
**Post date:** [May 28, 2021, 4:07pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/12 "2021-05-28T16:07:27Z")

</div>

It doesn’t work with text as the spaces breaks the link.  
I’ll be at the PC later and will show you

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 28, 2021, 4:12pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/13 "2021-05-28T16:12:57Z")

</div>

Worked for me - with spaces and several other characters that need encoding.

---

<div class="post-metadata">

**Author:** ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)\
**Post date:** [May 28, 2021, 4:35pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/14 "2021-05-28T16:35:16Z")

</div>

Care to share print screen of the settings?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 28, 2021, 4:35pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/15 "2021-05-28T16:35:58Z")

</div>

Here is a simple example:

 ![Screen Shot 2021-05-29 at 12.31.21 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/9/c9e515edc8315a97d093e4459589e09857088cf8.png)

Results in:

 ![Screen Shot 2021-05-29 at 12.32.02 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/a/1af5c27009a1d86063c10f178e3f8fa7f14ad100.png)

The one I tested with earlier used multiple image overlays and several lines of text, but I can’t share that one - you’ll just have to take my word that it worked 🙂

---

<div class="post-metadata">

**Author:** ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)\
**Post date:** [May 28, 2021, 4:40pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/16 "2021-05-28T16:40:25Z")

</div>

Yeah. Same here. The URL column will encode spaces along with other “unsuitable” characters so that the resulting URL is “compliant”.

---

<div class="post-metadata">

**Author:** ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)\
**Post date:** [May 28, 2021, 9:27pm UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/17 "2021-05-28T21:27:14Z")

</div>

Thanks will try again, maybe something with the Hebrew not working well or maybe it’s the comma I have in the text which breaks the link if cloudinary

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 29, 2021, 3:56am UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/18 "2021-05-29T03:56:57Z")

</div>

I think you’re right. Including commas in the text breaks it - even with English text.  
I just did some more testing and it appears that the URL column only encodes the parameters - not the `path` part of the URL construct. I think the fact that it was working for me last night was probably just a fluke. So maybe it’s back to my earlier idea…

The idea I had was to include your entire Cloudinary URL as the parameter part of the URL column (with dummy values for the protocol/host/path), and then use a template column to strip those (and the parameter name) out, leaving just the encoded URL. But I’m not really sure if that will work - I’ll try and find some time to do some testing with it today.

---

<div class="post-metadata">

**Author:** ![yinon\_raviv](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yinon_raviv/32/1627_2.png) [@yinon\_raviv](https://community.glideapps.com/u/yinon_raviv)\
**Post date:** [May 29, 2021, 5:38am UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/19 "2021-05-29T05:38:17Z")

</div>

This is what I tried doing but when putting something in the parameters it adds a question mark or equal sign to the link which is not working with cloudinary link

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 29, 2021, 5:52am UTC](https://community.glideapps.com/t/encode-text-or-substitute/27352/20 "2021-05-29T05:52:21Z")

</div>

@yinon_raviv take a look at this:

> **[Using special characters in Text overlaying (',') ?](https://support.cloudinary.com/hc/en-us/community/posts/200788162-Using-special-characters-in-Text-overlaying-)**
>
> How can we include special characters, like the\*\* ',' comma\*\* ? Tried replacing commas will Url Encoded characters (%2C), still no luck.
> 
> Below is the link that I have building on... Please refers ...

I was able to get it working by using the second method (replacing commas with `%E2%80%9A`), and then using the result as a replacement in a normal template column (no need for the URL column).

Give that a try and see if it works for you.

_Update_: Here is a template that double-escapes the standard set of “reserved” characters that are used in a Cloudinary URL…

 ![Screen Shot 2021-05-29 at 2.13.48 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/7/d7872a656062f011cdfe7faabfd13d26892de78d.png)

Using that template, you can take a string of text that looks like this: `the, quick: brown/ fox_`  
And turn it into this: `the%252C quick%253A%250A brown%252F%250A fox_%250A`  
And then that works in a Cloudinary URL

[Next page](https://community.glideapps.com/t/encode-text-or-substitute/27352.md?page=2)
