Urlencode for special characters
Hello,
I am trying to use the urlencode() + concat() functions to create a linked search. The link will display in a dashboard and open the search in a new window.
For the most part I have this working, however I tried to add a search parameter to the concat function which contains the tab character (\t) and that is not being encoded properly. My code looks like this:
| urlencode(concat("_sourceCategory=OS/Windows ", "| parse \"Computer Name:\t*\";\" as Host_name"))
As I said, everything works well until I add that line with the \t character. Is this a bug or am I completely missing somthing??
-
Official comment
Hi Joseph,
The good news is you're nearly there :-) The urlencode operator is interpreting the \t as a special character instead of string literals. Try the following:
| urlencode(concat("_sourceCategory=OS/Windows ", "| parse \"Computer Name:\\t*\\\";\\\" as Host_name")) as urlencoded
Let me know how you go :-)
- RJ
Comment actions
Please sign in to leave a comment.
Comments
2 comments