Restore default output sanitisation for viewlog records and replace the inline JavaScript detail popup with native details markup. This ports PR #1134 while preserving Smarty 3/4 and Bootstrap 3 compatibility. Refs #1128 Thanks @TrapoSAMA