diff --git a/src/lib/annotations/annotations.html b/src/lib/annotations/annotations.html
index fe03ea6531..2b61f358e4 100644
--- a/src/lib/annotations/annotations.html
+++ b/src/lib/annotations/annotations.html
@@ -88,7 +88,7 @@
this._parseElementAnnotations(node, list);
},
- _bindingRegex: /([^{[]*)({{|\[\[)([^}\]]*)(?:]]|}})/g,
+ _bindingRegex: /([^{[]*)(\{\{|\[\[)(?!\}\}|\]\])(.+?)(?:\]\]|\}\})/g,
// TODO(kschaaf): We could modify this to allow an escape mechanism by
// looking for the escape sequence in each of the matches and converting
diff --git a/test/unit/bind-elements.html b/test/unit/bind-elements.html
index 1c5b36c4c5..0d1c535058 100644
--- a/test/unit/bind-elements.html
+++ b/test/unit/bind-elements.html
@@ -26,6 +26,7 @@
no-computed="{{foobared(noInlineComputed)}}"
compoundAttr1$="{{cpnd1}}{{ cpnd2 }}{{cpnd3.prop}}{{ computeCompound(cpnd4, cpnd5, 'literal')}}"
compoundAttr2$="literal1 {{cpnd1}} literal2 {{cpnd2}}{{cpnd3.prop}} literal3 {{computeCompound(cpnd4, cpnd5, 'literal')}} literal4"
+ compoundAttr3$="{{computeCompound('world', 'username ', 'Hello {0} ')}}"
>
Test
diff --git a/test/unit/bind.html b/test/unit/bind.html
index 842b0073df..76aac224a7 100644
--- a/test/unit/bind.html
+++ b/test/unit/bind.html
@@ -767,6 +767,12 @@
assert.equal(el.$.boundChild.getAttribute('compoundAttr2'), 'literal1 literal2 literal3 literal literal4');
});
+ test('compound property attribute with {} in text', function() {
+ var el = document.createElement('x-basic');
+
+ assert.equal(el.$.boundChild.getAttribute('compoundAttr3'), 'Hello {0} username world')
+ })
+
test('compound adjacent textNode bindings', function() {
var el = document.createElement('x-basic');
// The single space is due to the gambit to prevent empty text nodes