From 690e8708e3c7d146e709ec9d377039eb39cde9b4 Mon Sep 17 00:00:00 2001 From: Matt Briney Date: Mon, 22 Apr 2019 16:45:43 -0400 Subject: [PATCH] Parsing hyperlinks in popup card --- src/Popup/Popup.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Popup/Popup.js b/src/Popup/Popup.js index 027d79c..27142ed 100644 --- a/src/Popup/Popup.js +++ b/src/Popup/Popup.js @@ -18,7 +18,11 @@ export function createPopupContent (popupInfo, properties) { if (popupInfo.fieldInfos !== undefined) { for (var i = 0; i < popupInfo.fieldInfos.length; i++) { if (popupInfo.fieldInfos[i].visible === true) { - content += '
' + popupInfo.fieldInfos[i].label + '

' + properties[popupInfo.fieldInfos[i].fieldName] + '

'; + if (properties[popupInfo.fieldInfos[i].fieldName].toString().indexOf("http://") == 0 || properties[popupInfo.fieldInfos[i].fieldName].toString().indexOf("https://") == 0) { + content += '
' + popupInfo.fieldInfos[i].label + '

More Info

'; + } else { + content += '
' + popupInfo.fieldInfos[i].label + '

' + properties[popupInfo.fieldInfos[i].fieldName] + '

'; + } } } content += '';