0

I am using the Content Query webpart for sharepoint online and try to query a hyperlink column from a list. I am query my "URL" column for the bing address.

<div class="url"><a href="{{URL.htmlValue}}">{{URL.htmlValue}}</a></div>

But this returns

https://sharepoint-tenant/sites/%3Ca%20href=%22http://bing.com%22%3EBING%3C/a%3E

How can I just get the direct URL?

2 Answers2

0

How do you get the value for the URL? As far as I know, the value of hyperlink column should have a Description property and a Url property. You could just use the url property to get the direct URL.

Michael Han
  • 3,475
  • 1
  • 6
  • 8
0

Not sure I understand your problem correctly, but if you already have URL encoded, you can use triple quotes to avoid double-encoding with handlebars:

<div class="url"><a href="{{{URL.htmlValue}}}">{{{URL.htmlValue}}}</a></div>
Nikolay
  • 10,752
  • 2
  • 23
  • 51