Ignore Polymer bound src="[[attr]]" from grit processing.

BUG=chromium:526577
Review URL: https://codereview.chromium.org/1374383003/

Patch from Dan Beam <dbeam@chromium.org>.


git-svn-id: http://grit-i18n.googlecode.com/svn/trunk@199 7262f16d-afe8-6277-6482-052fa10e57b1
diff --git a/grit/format/html_inline.py b/grit/format/html_inline.py
index bb8416d..f532496 100755
--- a/grit/format/html_inline.py
+++ b/grit/format/html_inline.py
@@ -46,7 +46,7 @@
     '<include[^>]+?src="(?P<filename>[^"\']*)".*?>(\s*</include>)?',
     re.DOTALL)
 _SRC_RE = lazy_re.compile(
-    r'<(?!script)(?:[^>]+?\s)src=(?P<quote>")(?P<filename>[^"\']*)\1',
+    r'<(?!script)(?:[^>]+?\s)src=(?P<quote>")(?!\[\[|{{)(?P<filename>[^"\']*)\1',
     re.MULTILINE)
 _ICON_RE = lazy_re.compile(
     r'<link rel="icon"\s(?:[^>]+?\s)?'
diff --git a/grit/format/html_inline_unittest.py b/grit/format/html_inline_unittest.py
index f392cf5..ea76d37 100755
--- a/grit/format/html_inline_unittest.py
+++ b/grit/format/html_inline_unittest.py
@@ -37,6 +37,8 @@
           <include src="test.html">
           <include
               src="really-long-long-long-long-long-test-file-omg-so-long.html">
+          <iron-icon src="[[icon]]"></iron-icon><!-- Should be ignored. -->
+          <iron-icon src="{{src}}"></iron-icon><!-- Also ignored. -->
         </body>
       </html>
       ''',