probabilmente a safari non piace perche' per settare l' innerHTML dovresti fare cosi'
document.getElementById("mydiv").innerHTML=stringa ;