Skip to main content
Question

Pipeline Jinja url decode

  • September 6, 2024
  • 0 replies
  • 283 views

Forum|alt.badge.img+6

In a Pipeline, you can use the Jinja urlencode filter to encode a value that needs to be safely encoded for use somewhere else.

However, how can you use the URL Decode function?  I am used to Python, JavaScript, and other languages where you can easily use a URL Decode function.  In fact, it seems in the full subset of Jinja filters or function, there actually IS a urldecode but that Quickbase hasn't implemented it in their build of Jinja for Pipelines.

Any ideas?

Desired: 

{{a.json.url | urldecode}}

 

This topic has been closed for replies.

Forum|alt.badge.img+6
  • Author
  • Registered
  • September 6, 2024

Well, there is always this.  But who wants to do this when it would be easier to just use a built-in filter?

{{
    a.body_json[0].changesUrl
    | replace("%3a", ":")
    | replace("%2f", "/")
    | replace("%3f", "?")
    | replace("%3d", "=")
    | replace("%5b", "[")
    | replace("%2c", ",")
    | replace("%5d", "]")
    | replace("%26", "&")
}}