Skip to content

URL is getting truncated #330

@dleangen

Description

@dleangen
  • Operating System: MacOS
  • Node Version: 14.13.0
  • NPM Version: 6.14.8
  • webpack Version: 4.42.1
  • html-loader Version: 1.3.2

Expected Behavior

Within a partial, I am trying to include an svg image like so:

<svg class="icon-link__scroll-to-top--icon">
  <use xlink:href="../../images/sprites.svg#icon-chevron-with-circle-up"></use>
</svg>

I am expecting the output to be something like this:

<svg class="icon-link__scroll-to-top--icon">
  <use xlink:href="assets/img/3502e89a3fabd1b15fbd17dfdb49d7d7.svg#icon-chevron-with-circle-up"></use>
</svg>

Actual Behavior

The generated URL is truncated, like this:

<svg class="icon-link__scroll-to-top--icon">
  <use xlink:href="assets/img/3502e89a3fabd1b15fbd17dfdb49d7d7.svg#icon-chevron-with-circl"></use>
</svg>

Obviously, my icons cannot work.

How Do We Reproduce?

Reproduce by including an svg image with a URL that includes a fragment that is longer than 23 characters.

This is the related rule in my webpack config:

            {
                test: /\.hbs$/,
                use: [{ loader: 'handlebars-loader' }, { loader: 'extract-loader' }, { loader: 'html-loader' }]
            },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions