Regex issue in Chrome 75 replacing 's' in keys defined with the display option
We have identified an issue whereby keys defined in the display option are having their 's' characters replaced with the character code s.
This problem only appeared with the release of Chrome 75.
Naturally this is causing significant issues for us given we have a number of custom keys using <span/> - i.e. <span/>.
This StackOverflow answer outlines the cause of the problem with Chromium/V8 but it appears a fix may be some versions away.
Our short-term solution was to release an emergency hotfix with a monkey-patched version of the keyboard - with the problem regex removed. (not much of a solution, I know)
data.html = '<span class="' + kbcss.keyText + '">' +
// this prevents HTML from being added to the key
keys.name.replace(/[\u00A0-\u9999]/gim, function (i) {
return '&#' + i.charCodeAt(0) + ';';
}) +
'</span>';
I'm not sure if there is anything to be done - this was more just an FYI for anyone else encountering the problem.
Hi @mattsmith-au!
I've been meaning to remove that and just allow raw html to be added. That is a weird Chrome bug. I'll patch this fix ASAP.
Updated in https://github.com/Mottie/Keyboard/commit/5f2620c26143cdeaa7c4eb4e66a6845b79552da6.
Oops! Done.