Closed dontpanic92 closed 8 years ago
When username contains non-latin characters, for example 哈哈哈, the plugin cannot work normally.
I take a look at main.js, and found this line:
if (href && (!utils.invalidLatinChars.test(href[2]) && !utils.invalidUnicodeChars.test(href[2]))) {
https://github.com/Schamper/nodebb-plugin-cards/blob/master/public/js/main.js#L20
Non-latin unicode characters cannot pass the first utils.invalidLatinChars.test(href[2]) test, and so the card won't pop up.
utils.invalidLatinChars.test(href[2])
I remember there being a reason as to why I did this, but I can't remember. I'll try and do some testing when I get time.
When username contains non-latin characters, for example 哈哈哈, the plugin cannot work normally.
I take a look at main.js, and found this line:
if (href && (!utils.invalidLatinChars.test(href[2]) && !utils.invalidUnicodeChars.test(href[2]))) {
https://github.com/Schamper/nodebb-plugin-cards/blob/master/public/js/main.js#L20
Non-latin unicode characters cannot pass the first
utils.invalidLatinChars.test(href[2])
test, and so the card won't pop up.