You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a JS file containing such comment:
// stamp template
// which includes parsing and applying MDV bindings before being
// inserted (to avoid {{}} in attribute values)
// e.g. to prevent <img src="images/{{icon}}"> from generating a 404.
When this file is imported into a HTML file, GRIT treats <img> tag as a real
HTML tag and generates an dependency for 'src'. That shouldn't happen. Here is
an unit test demonstrating the error:
def testTagsInJSComments(self):
'''Tests that "<img src=...>" tags inside JS comment are ignored.'''
files = {
'index.js': '''
// <img src="example.png">
''',
}
source_resources = set()
tmp_dir = util.TempDir(files)
for filename in files:
source_resources.add(tmp_dir.GetPath(filename))
resources = html_inline.GetResourceFilenames(tmp_dir.GetPath('index.js'))
resources.add(tmp_dir.GetPath('index.js'))
self.failUnlessEqual(resources, source_resources)
tmp_dir.CleanUp()
Original issue reported on code.google.com by [email protected] on 11 Dec 2014 at 12:07
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 11 Dec 2014 at 12:07The text was updated successfully, but these errors were encountered: