testaro 18.13.4 → 18.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "18.13.4",
3
+ "version": "18.13.5",
4
4
  "description": "Run 920 web accessibility tests from 9 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/testaro/headEl.js CHANGED
@@ -33,7 +33,9 @@ exports.reporter = async page => {
33
33
  // Change any spacing character sequences in it to single spaces.
34
34
  rawPage = rawPage.replace(/\s+/g, ' ');
35
35
  // Delete everything in it except the head content.
36
- rawPage = rawPage.replace(/^.*<head[^>]*>|<\/head>.*$/g, '');
36
+ rawPage = rawPage.replace(/^.*<head>|<\/head>.*$/g, '');
37
+ // Delete any scripts from it.
38
+ rawPage = rawPage.replace(/<script[ >].+?<\/script>/g, '');
37
39
  // Get the tag names of the remaining elements.
38
40
  const tags = rawPage.match(/<([a-z]+)/g);
39
41
  const ucTagNames = tags.map(tag => tag.toUpperCase().slice(1));