Generic JavaScript View mailto link

Hello

I’m having an issue with the Generic JavaScript View (Workflow Application Header)

I’m trying to use a mailto-link, I’ve already “hacked” the script to omit the target parameter if it’s an email address but unfortunatly it converts the @ to the decimal @

Screenshot from browser:

The link gets transferred via string flow variable.

The code in question:

names = $${Sname_linkList}$$.split(/\r?
/)
urls = $${Surls_linkList}$$.split(/\r?
/)
var containerDiv = document.createElement(‘div’);
containerDiv.id = ‘link-list’;
names.forEach((name, index) => {
var linkItem = document.createElement(‘div’);
linkItem.style.display = ‘flex’;
linkItem.style.alignItems = ‘center’;
linkItem.style.marginBottom = ‘10px’;
var link = document.createElement('a');
link.href = urls[index];
if (urls.some(url => url.includes("mailto"))){
}
else {
link.target = "_blank";
}

The flow variables, the @ in the link text works fine.

Any help is appreciated :slight_smile: