Repository: parcel-bundler/parcel
File: packages/core/integration-tests/test/html.js (JavaScript)

Code before:
      a: '<script></script>',
      b: '<!-- test',
      c: '<SCRIPT></SCRIPT>',
    });
  });

  it('should escape quotes in inline style attributes and style tags', async function() {
    let b = await bundle(
      path.join(__dirname, 'integration/html-inline-escape/style.html'),
    );
    let output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');
    let name = path.basename(
      b.getBundles().find(b => b.type === 'png').filePath,
      'utf8',
    );
    assert(output.includes(`url(&quot;${name}&quot;)`));
    assert(output.includes('<\\/style>'));
  });

  it('should work with bundle names that have colons in them', async function() {
    // Windows paths cannot contain colons, so write the file here (in memory).
    await overlayFS.mkdirp(path.join(__dirname, 'integration/url-colon'));
    await overlayFS.writeFile(
      path.join(__dirname, 'integration/url-colon/a:b:c.html'),
      '<p>Test</p>',
    );

    let b = await bundle(
      path.join(__dirname, 'integration/url-colon/relative.html'),
      {inputFS: overlayFS},
    );

    assertBundles(b, [
      {
        name: 'relative.html',
        assets: ['relative.html'],
      },
      {
        name: 'a:b:c.html',
        assets: ['a:b:c.html'],
      },
    ]);

    let output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');
    assert(output.includes('/a:b:c.html'));

    b = await bundle(
      path.join(__dirname, 'integration/url-colon/absolute.html'),
      {inputFS: overlayFS},
    );


Review comment (bug):
Does this fix the colon issue? I notice the benchmarks still fail due to a invalid path with colons and I notice it on[ other PRs as well](https://github.com/parcel-bundler/parcel/pull/6514). Is that just a bug we introduced somewhere and is now in V2 ? 😟 

Code after:
      a: '<script></script>',
      b: '<!-- test',
      c: '<SCRIPT></SCRIPT>',
    });
  });

  it('should escape quotes in inline style attributes and style tags', async function() {
    let b = await bundle(
      path.join(__dirname, 'integration/html-inline-escape/style.html'),
    );
    let output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');
    let name = path.basename(
      b.getBundles().find(b => b.type === 'png').filePath,
      'utf8',
    );
    assert(output.includes(`url(&quot;${name}&quot;)`));
    assert(output.includes('<\\/style>'));
  });

  it('should work with bundle names that have colons in them', async function() {
    if (process.platform === 'win32') {
      return;
    }

    // Windows paths cannot contain colons and will fail to git clone, so write the file here (in memory).
    await overlayFS.mkdirp(path.join(__dirname, 'integration/url-colon'));
    await overlayFS.writeFile(
      path.join(__dirname, 'integration/url-colon/a:b:c.html'),
      '<p>Test</p>',
    );

    let b = await bundle(
      path.join(__dirname, 'integration/url-colon/relative.html'),
      {inputFS: overlayFS},
    );

    assertBundles(b, [
      {
        name: 'relative.html',
        assets: ['relative.html'],
      },
      {
        name: 'a:b:c.html',
        assets: ['a:b:c.html'],
      },
    ]);

    let output = await outputFS.readFile(b.getBundles()[0].filePath, 'utf8');
    assert(output.includes('/a:b:c.html'));

    b = await bundle(