Dear in5 team,
By upgrading to in5-3.8.10 have noticed, that HyperLinks defined from Indesign throw an error at iOS Safari.
Example of link, exported from InDesign via IN5.
<a href="#">
<div alt=""> </div>
</a>
I suppose, you need to ask IN5 developers, to adjust function definition from "assets/js/in5.config.js" to strip "javascript:" prior call strict function like:
function strfunc(str,cthis){
if(!str || !str.length){ return; }
if(cthis){ str = str.replace(/this\)/g, '$(\'[data-uid="'+getUID(cthis)+'"]\')[0])'); }
str.replace(/;$/,'').split(';').forEach(function(s){
s = s.replace("javascript:", "");
try{ return Function('"use strict";return ('+s+')')(); }
catch(err){console.log('strfunc error running: '+s+'\r>>>'+err)}
})
}
1 answer
Thank you for sending the code over. We will have a developer take a look.
Here's the information I got from our developer about what sounds like the same issue with hyperlinks:
function openLink($a,e){ var href=$a.attr('href'), w; if(href.indexOf('javascript:')===0){strfunc(href,$a[0]); w=!0;} else { w = window.open(href,$a.attr('target')||'_blank'); } if(e && w){ e.preventDefault(); } }function openLink($a,e){ var href=$a.attr('href'), w; if(href.indexOf('javascript:')===0){strfunc(href.substring("javascript:".length),$a[0]); w=!0;} <--- MODIFIED LINE else { w = window.open(href,$a.attr('target')||'_blank'); } if(e && w){ e.preventDefault(); } }function openLink($a,e){in5 team · 2022-09-27