Gravatar for

Question by JFCG, Nov 3, 2014 3:16 PM

Can you use jsrender in an Advanced Content to generate clickable links from addresses with and without http(s) prefixes?

Let's say I have a Custom Link, in an Insight Panel, on a field that returns addresse both with and without an http(s):// prefix.

The addresses returned with an http(s) prefix are rendered correctly, but addresses that come in without prefix (say, are turned into something like the following, which is of course invalid.

I thought maybe something could be done with an Advanced Content component rather than the Custom Link, with the proper jsrender code. Would you have any detailed way to get this working, with code samples I could use?

Gravatar for

Comment by JFCG, Nov 6, 2014 3:17 PM

I've been told that this cannot be achieved with plain JSRender, unless one registers a new "helper" function to make it accessible from the template (JsRender being used there because it disallows arbitratry JS code).

So, one would need to use a custom VF page for the panel, and from there register custom helpers with JsRender ( for example). This helper would check for a leading scheme in the url, and add it if needed.

However, I'm afraid this could appear daunting for most users, so I'd like to know if anyone has more details or a simpler alternative.

Gravatar for

Comment by JFCG, Dec 9, 2014 7:19 AM

Anyone, please?

1 Reply
Gravatar for

Answer by ger_art, Nov 10, 2014 5:49 AM


This behaviour also occurs in the search interface. We use the normal weblink field from salesforce. we usually copy the webaddress from our browser (including https etc.). in the weblink field. After indexing with coveo we can't use the link. We can only make the weblink work if we manually type in the webaddress without http://. I think this problem is solved when you run a script before indexing to remove the https from the url?

Ask a question