For #4664, set value of empty attribute to the attribute string

@dangoor