You are viewing limited content. For full access, please sign in.

Question

Question

Web Client - Issue with special characters in the URL for custom tabs

asked on December 12, 2019 Show version history

In the Web Client, I want to use a custom tab that would display an URL. I want this URL to be dynamic so I try to use a dedicated field to store the dynamic portion, and use it in the construction of my URL.

This part can contain some special characters such as = / ? etc.
But when Laserfiche build my URL, it automatically replaces all these characters by their encoded version (? becomes %3F, = becomes %3D ...) so my final URL is no longer OK.

EX : Fixed portion:   https://myurl.com/
Dynamic portion:    something?parameter=value

 

Full URL expected: https://myurl.com/something?parameter=value
What I get: https://myurl.com/something%3Fparameter%3Dvalue

 

Has anyone already faced that? How did you manage it?

0 0

Replies

replied on December 13, 2019

Which part needs to be dynamic? The problem you're likely having is that the ? and = are coming from a text field, so when the URL is generated it is encoding them for a URL.

This is to be expected so values in the source field don't cause unexpected behavior in the URL (i.e., white spaces and/or special characters causing the browser to misinterpret the URL, etc.).

If you need the literal characters, such as for a query string, then I believe they might need to be in the Website URL configuration, not the field.

0 0
replied on December 13, 2019

Jason is right, it's encoding your data because that's the required thing to do in the intended use case where the field contains a value to send to a remote server. We would need to add an option for you to disable the encoding when you are constructing a URL.

Thanks for bringing this use case to our attention.

0 0
replied on December 16, 2019

Can you design it so that only the parameter part is in the field? I mean the "value" part in your example.

0 0
replied on December 17, 2019

That could work with one parameter, but I would like to pass multiple parameters.

Also, my example was very generic, but my final idea would be to use the same custom tab to display different starting forms, with pre-filled data. So I wanted to use my LF field (and a workflow) to build and store the dynamic part of my URL. And use this field within my custom tab.  

But based on Brian's answer, that is not possible at the moment because of the automatic encoding of my field once used in the URL.

I could use a dedicated tab for each starting form. But every users would be able to see all of them, which would be too many.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.