diff --git a/.github/ISSUE_TEMPLATE/BUG.md b/.github/ISSUE_TEMPLATE/BUG.md
index 62092dcb..909226ad 100644
--- a/.github/ISSUE_TEMPLATE/BUG.md
+++ b/.github/ISSUE_TEMPLATE/BUG.md
@@ -16,7 +16,7 @@ about: Something went awry and you'd like to tell us about it.
### Actual Behavior
-
+
### Expected Behavior
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index b7d504aa..7a408711 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -25,19 +25,16 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- - name: Use latest NPM
- run: sudo npm i -g npm
-
- name: Install dependencies
run: npm ci
@@ -56,7 +53,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
- node-version: [12.x, 14.x, 16.x, 17.x]
+ node-version: [14.x, 16.x, 18.x]
webpack-version: [latest]
runs-on: ${{ matrix.os }}
@@ -66,32 +63,25 @@ jobs:
if: matrix.os == 'windows-latest'
run: git config --global core.autocrlf input
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- - name: Use latest NPM on ubuntu/macos
- if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- run: sudo npm i -g npm
-
- - name: Use latest NPM on windows
- if: matrix.os == 'windows-latest'
- run: npm i -g npm
-
- name: Install dependencies
run: npm ci
- name: Install webpack ${{ matrix.webpack-version }}
+ if: matrix.webpack-version != 'latest'
run: npm i webpack@${{ matrix.webpack-version }}
- name: Run tests for webpack version ${{ matrix.webpack-version }}
run: npm run test:coverage -- --ci
- name: Submit coverage data to codecov
- uses: codecov/codecov-action@v2
+ uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6ca5915f..e953d2e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+### [4.0.0](https://github.com/webpack-contrib/html-loader/compare/v3.1.0...v4.0.0) (2022-06-15)
+
+### ⚠ BREAKING CHANGES
+
+* minimum supported `Node.js` version is `14.15.0`
+* update `parse5` to `7.0.0`
+
+
+### Bug Fixes
+
+* handle text with `" to "<" + "script>" or "<" + "/script>".
+ code = code.replace(/<(\/?script)/g, (_, s) => `<" + "${s}`);
+
return `// Module\n${replacersCode}var code = ${code};\n`;
}
diff --git a/test/__snapshots__/esModule-option.test.js.snap b/test/__snapshots__/esModule-option.test.js.snap
index 967d76f8..45a3bdec 100644
--- a/test/__snapshots__/esModule-option.test.js.snap
+++ b/test/__snapshots__/esModule-option.test.js.snap
@@ -63,7 +63,7 @@ var ___HTML_LOADER_REPLACEMENT_29___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(
var ___HTML_LOADER_REPLACEMENT_30___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_21___);
var ___HTML_LOADER_REPLACEMENT_31___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_22___);
var ___HTML_LOADER_REPLACEMENT_32___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_23___);
-var code = \\"\\\\n\\\\n
My First Heading
\\\\nMy first paragraph.
\\\\nAn Unordered HTML List
\\\\n\\\\n\\\\n - Coffee
\\\\n - Tea
\\\\n - Milk
\\\\n
\\\\n\\\\nAn Ordered HTML List
\\\\n\\\\n\\\\n - Coffee
\\\\n - Tea
\\\\n - Milk
\\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nFoo
\\\\n\\\\n\\\\nBAR
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
\\\\n\\\\n\\\\n\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n\\\\n\\\\n \\\\n \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n