LPS-52160 Fix compile error
LPS-52167 fix inverted condition
LPS-52167 fix double escaping

aui:button eventually calls `AUIUtil.buildData`, which itself calls
`escapeAttribute`.