Unable to parse correctly a filter as part of a custom URL when field values contain apostrophe characters

Hi Everyone,

I’m struggling to create a link (from a table visualization) to a drill-down dashboard using scripted fields with the URL format template. This is the following:


The field “dt” represents a news headline/title from a news website. This URL perfectly works except when the field value contains an apostrophe like, for example, the following headline:

“MasterChef Celebrity: Jorge Lanata cuestionó la participación de María O'Donnell

The resulting URL with this example is:


In this case, Kibana shows the message: “Unable to parse URL” and doesn’t apply the filter needed.

I managed to parse correctly the URL replacing the apostrophe ' with ‘ (and other similar characters), but the value doesn't match (I suppose this is the expected behavior).

Is there an alternative way to create the custom URL with the apostrophe? I tried using double quotes but it didn't work. Is it possible to use any other character as a synonym for ' ?

Just in the case that it could be useful, I leave the mapping definition for the field dt below:

    "dt" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
              "fielddata" : true

I know that in newer versions of Elastic/Kibana there’s a straightforward way to create a drill-down dashboard, but at the moment we have 7.6.2 and I need to solve that issue in this version. I look forward to working with the latest version soon.


Hey @Gerardo_Marcotrigian,

I believe the single-quote will be escaped correctly if you prepend it with !, for example !'.

So, O'Donnell would become O!'Donnell.

Can you give that a try and let me know how it works?


@brianseeders. That works perfectly!
Thank you so much for your support :smiley:

1 Like

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