Skip to content

Commit 9a963de

Browse files
committed
Fix for #18
1 parent 53e0361 commit 9a963de

6 files changed

Lines changed: 12 additions & 9 deletions

File tree

dist/paypal-button-minicart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* PayPalJSButtons
33
* JavaScript integration for PayPal's payment buttons
4-
* @version 1.0.0 - 2013-03-15
4+
* @version 1.0.0 - 2013-03-17
55
* @author Jeff Harrell <https://github.com/jeffharrell/>
66
*/
77
/*!
@@ -1993,7 +1993,7 @@ PAYPAL.apps = PAYPAL.apps || {};
19931993
for (i = 0, len = attrs.length; i < len; i++) {
19941994
attr = attrs[i];
19951995

1996-
if ((matches = /^data-([a-z0-9]+)(-editable)?/i.exec(attr.name))) {
1996+
if ((matches = /^data-([a-z0-9_]+)(-editable)?/i.exec(attr.name))) {
19971997
dataset[matches[1]] = {
19981998
value: attr.value,
19991999
isEditable: !!matches[2]

dist/paypal-button-minicart.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/paypal-button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* PayPalJSButtons
33
* JavaScript integration for PayPal's payment buttons
4-
* @version 1.0.0 - 2013-03-15
4+
* @version 1.0.0 - 2013-03-17
55
* @author Jeff Harrell <https://github.com/jeffharrell/>
66
*/
77
if (typeof PAYPAL === 'undefined' || !PAYPAL) {
@@ -260,7 +260,7 @@ PAYPAL.apps = PAYPAL.apps || {};
260260
for (i = 0, len = attrs.length; i < len; i++) {
261261
attr = attrs[i];
262262

263-
if ((matches = /^data-([a-z0-9]+)(-editable)?/i.exec(attr.name))) {
263+
if ((matches = /^data-([a-z0-9_]+)(-editable)?/i.exec(attr.name))) {
264264
dataset[matches[1]] = {
265265
value: attr.value,
266266
isEditable: !!matches[2]

dist/paypal-button.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/paypal-button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ PAYPAL.apps = PAYPAL.apps || {};
254254
for (i = 0, len = attrs.length; i < len; i++) {
255255
attr = attrs[i];
256256

257-
if ((matches = /^data-([a-z0-9]+)(-editable)?/i.exec(attr.name))) {
257+
if ((matches = /^data-([a-z0-9_]+)(-editable)?/i.exec(attr.name))) {
258258
dataset[matches[1]] = {
259259
value: attr.value,
260260
isEditable: !!matches[2]

test/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ <h2>Buy Now (Spanish)</h2>
3232
data-name="Buy now!"
3333
data-amount="1.00"
3434
data-lang="es_ES"
35+
data-currency_code="EUR"
3536
></script>
3637
</div>
3738

@@ -42,6 +43,7 @@ <h2>Buy Now (French)</h2>
4243
data-name="Buy now!"
4344
data-amount="1.00"
4445
data-lang="fr_FR"
46+
data-currency_code="EUR"
4547
></script>
4648
</div>
4749

@@ -52,6 +54,7 @@ <h2>Buy Now (German)</h2>
5254
data-name="Buy now!"
5355
data-amount="1.00"
5456
data-lang="de_DE"
57+
data-currency_code="EUR"
5558
></script>
5659
</div>
5760

0 commit comments

Comments
 (0)