Link Open in new tab

My response contains a link. If I click on that link it is opening in the same tab.How can we open it in new tab when that link is mentioned in domain.ymal not in custom action.

<a href=“link” target="_blank"> name </a>

Hi @RGK , thanks for the response, It is giving response as that code <a href …

How can we write it in domain.yml, Please give me an example


  • text: <a href=“link” target="_blank"> name </a>

If you get the plain text in your app, you have to solve it there. Parse or add it as HTML. In Angular you can use the DOMSanitizer and create an “allowHtml” - pipe.

Hey @RGK , I am getting plane text , How can we Parse or add it as HTML in domain.yml


How you achieve this?

hi, i solved this by modifiying index.js file

                    <a href={props.href}>{props.children}</a>


                    <a href={props.href} target="_blank">{props.children}</a>


which index.js file are you talking about in particular?

I’m experiencing the same issue. In my case, I’m jumping to various sections on my page by the use of anchor hashtags. E.g. the bot would utter You can find this information [here](#information) and the user would jump to the respective part in the page when clickin on the link. However, I also have links to external websites which should, obviously, open in new tabs.

If I put <base target="_blank"> on the top of the html, ALL links will be opened in a new window, including the internal ones. If I leave it out, no link will be opened in a new window. So I’m kind of stuck here.

There are variants of markdown that support specifying a link’s target. However, either rasa-webchat or rasa core don’t support this as they don’t work for me.

I appreciate any help.


Hello @ tabularasa

I’m working with rasa-webchat and its ok, this is the file i modified


hope this help u

@OUHIBIadel Thanks a lot! I suppose you’re using the webchat as a react component?

@tabularasa exactly, but i’m not proficient in web dev