Added attribute escape/unescape functions