Skip to content

Regex support for pattern attribute #132

@baidario

Description

@baidario

I'm submitting a bug report

Webpack version: 3.0.0
HTML-Loader version: 0.4.5
Please tell us about your environment: Windows 10

Current behavior:
I use angularjs, and some inputs has ng-pattern attribute. html-loader remove backslashes in regex inside this attribute and because of this regex not valid.
In my code I have ng-pattern="/^\+[\d]{7,15}$/" and output is

Expected/desired behavior:
Please, add regex processing

Loader config

{
  test: /\.html$/, 
  use: [
    {
      loader: 'html-loader',
      options: {
        minimize: true,
        removeComments: true,
        collapseWhitespace: true,
        interpolate: true
      }
    }
  ]
}
  • Browser: Chrome 59

  • Language: ES5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions