Optimized object manager handling in HTMLUtils.pm.