[security] XSS with malicious ENUM values

Signed-off-by: Marc Delisle <marc@infomarc.info>

Conflicts:
	libraries/Util.class.php

Signed-off-by: Marc Delisle <marc@infomarc.info>
Bug 4544: additional fix for 4.2.x

Signed-off-by: Marc Delisle <marc@infomarc.info>