# Escape single quotes in URL field

**URL:** <https://discuss.elastic.co/t/escape-single-quotes-in-url-field/297120>\
**Category:** Kibana\
**Created:** [February 14, 2022, 9:58am UTC](https://discuss.elastic.co/t/escape-single-quotes-in-url-field/297120 "2022-02-14T09:58:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thenotoriousciu](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@thenotoriousciu](https://discuss.elastic.co/u/thenotoriousciu)\
**Post date:** [February 14, 2022, 9:58am UTC](https://discuss.elastic.co/t/escape-single-quotes-in-url-field/297120/1 "2022-02-14T09:58:01Z")

</div>

Hello,  
I am trying to create a URL field which redirects to a different dashboard. The values in this field have the following format: **'Application': Create** (notice the single quotes). The problem is that when the link redirects, it looks like this: `query:'policy.permission.name:'Application':%20Create'` and, obviously, it doesn't work becuase of the single quotes.  
If I filter directly in the dashboard, I notice that the single quotes are escaped by exclamation marks:  
`query:'policy.permission.name:%22!'Application!':%20Create%22'`.  
My question is: how can I define the URL field so that so that it redirects correctly to my dashboard? I tried adding double quotes to {{value}} in the URL template field but it didn't do the trick:  
`query:'policy.original.Authorization.permission.name.keyword:"{{value}}"'`

Thanks.  
Alex

---

<div class="post-metadata">

**Author:** ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)\
**Post date:** [February 15, 2022, 8:32pm UTC](https://discuss.elastic.co/t/escape-single-quotes-in-url-field/297120/2 "2022-02-15T20:32:31Z")

</div>

Hey @thenotoriousciu, I am guessing you're using a URL drilldown here?

If so, it seems like we should probably provide an option to URI encode the values in a URL drilldown for this type of use-case. I will look into that.

In the meantime, is there any particular reason you're using a URL drilldown to redirect to a dashboard? We also have a dashboard drilldown which can apply filters based on the value you select without you having to write it into a url.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 15, 2022, 8:32pm UTC](https://discuss.elastic.co/t/escape-single-quotes-in-url-field/297120/3 "2022-03-15T20:32:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
