(Note: cannot make a Fiddle since the template provided by the link in the website includes v.1.6.4 which isn't affected by this bug.)
I was testing v2.0.0 beta 2 and I noticed a regression.
How to reproduce: try to assign to one or more buttons a custom text that includes a html entity.
I wanted to use entities for right and left arrows (← and →) but the entities didn't convert to the correct character, instead they resulted in an ampersand and then the 'larr;' or 'rarr;' string.
Inspecting the code of htmlEscape() function show that the first replacement is done by
(s + '').replace(/&/g, '&')
but this part just replace the ampersand of each entities into '&', thus breaking the entity.
Changing /&/g into /&(?!\w+;)/g should solve the issue.
Status: WontFix
Labels: milestone-date