Problem with the url in the text


I want to pass URLs in text ,that a user can use to get there. In content data i am passing a variable (i.e “{{event.user.url1}}” so i can pass URLs dynamically. The problem is that the URL brakes because ,some special characters are encoded like / that is shown as /
I tried to decode the variable with querystring.unescape() or he.decode() but i got the same output.


Does the same occurs for you in markdown?
(It’s possible to set markdown: true in renderer)


@alex yes this also occurs in markdown. Where should i set markdown to true (in renderers.js)? I am a little bit confused,

Thanks in advance


Also had this problem because i ask an user to submit an URL to solve this i decode the url:
const entities = new Entities();


if i type a message inside the json of content data it does decode it correctly, but i have a variable ( {{event.text.url}} ) which it does not decode it in the text shown on the gui. it still shows / instead of /.


@jkar, which botpress version are you using?I wasn’t able to reproduce this issue:


I have the same problem.

I’m using Axios to make a REST request and then I want to display the link in the webchat UI. When I pass the link as a variable back to the UI by adding it to the state, it does not render correctly. I’ve tried to encode with encodeURIComponents, it also fails to be decoded properly. I think the Linkify component is the one that’s causing issues here, but I haven’t really peeled back the library to investigate it further. Links that hard-coded into the UI (i.e. they’re in the text.json file), are rendered correctly.

This is what I get when I append the URL to the scope:

Same thing logs as in the console.

My code is pretty simple:

    return {
        ...state, // We clone the state
      somevar: uri

I’ve checked my versions and I am using botpress 10.51 (specified in Botfile.js)


@zuzgiertl, how are you rendering that link from the state?


{{state.somevar}} in the Botpress Flow UI.