Fixed sanitize javascript callback