From d5fb086b5142ef7aa418511cbdfa6ebe762a1409 Mon Sep 17 00:00:00 2001 From: Stefan Thomas Date: Fri, 23 Aug 2013 15:13:31 -0700 Subject: [PATCH] Digits appear in some currency codes in the ledger history. We need to figure out what the exact allowed character set is - if there are any restrictions. --- src/js/ripple/currency.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/ripple/currency.js b/src/js/ripple/currency.js index 54ca01ac..a3f6b4ff 100644 --- a/src/js/ripple/currency.js +++ b/src/js/ripple/currency.js @@ -92,7 +92,7 @@ Currency.prototype.parse_bytes = function (byte_array) { } if (isZeroExceptInStandardPositions) { var currencyCode = String.fromCharCode(byte_array[12]) + String.fromCharCode(byte_array[13]) + String.fromCharCode(byte_array[14]); - if (/^[A-Z]{3}$/.test(currencyCode) && currencyCode !== "XRP" ) { + if (/^[A-Z0-9]{3}$/.test(currencyCode) && currencyCode !== "XRP" ) { this._value = currencyCode; } else if (currencyCode === "\0\0\0") { this._value = 0;