Handle escapeAttrib(undefined) better