Ticket #3461. Protect output to browser by using htmlspecialchars.
Check if the package is installed before deleting opteration is started
Fixes #3461. Remove any special char that can lead to shell/XSS compromises from submitted input.