Commit Graph

26786 Commits

Author SHA1 Message Date
79e3cb51e5 feat(learn): add/remove tests for Imperial-Metric Converter (#39615)
* Remove Infosoc Tests, Add tests, fix error reporting

* Add capital 'L' for liter requirement, check unit/funct test counts

* Apply suggestions from code review

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>

* Apply suggestions from code review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2020-11-24 20:19:49 +00:00
5a41edca1a fix(learn): issue tracker test text error message (#40301) 2020-11-24 12:56:41 -06:00
6064e827e9 chore(deps): bump gatsby-transformer-remark in /client
Bumps [gatsby-transformer-remark](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-transformer-remark) from 2.9.2 to 2.11.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-transformer-remark/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-transformer-remark@2.11.0/packages/gatsby-transformer-remark)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 08:30:12 +00:00
7cf76231e8 chore(deps): bump gatsby-cli from 2.13.1 to 2.14.0 in /client
Bumps [gatsby-cli](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-cli) from 2.13.1 to 2.14.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-cli/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-cli@2.14.0/packages/gatsby-cli)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 08:23:53 +00:00
3cb282adc1 chore(deps): bump gatsby from 2.26.1 to 2.27.0 in /client
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.26.1 to 2.27.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.26.1...gatsby@2.27.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 06:01:09 +00:00
61e27d1877 chore(deps): bump typescript from 4.0.5 to 4.1.2 in /client
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.5 to 4.1.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.5...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:58:45 +00:00
ddc8388d4b chore(deps): bump react-tooltip from 4.2.10 to 4.2.11 in /client
Bumps [react-tooltip](https://github.com/wwayne/react-tooltip) from 4.2.10 to 4.2.11.
- [Release notes](https://github.com/wwayne/react-tooltip/releases)
- [Changelog](https://github.com/wwayne/react-tooltip/blob/master/CHANGELOG.md)
- [Commits](https://github.com/wwayne/react-tooltip/compare/v4.2.10...v4.2.11)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:48:45 +00:00
ab86363f5f chore(deps): bump gatsby-source-filesystem in /client
Bumps [gatsby-source-filesystem](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-source-filesystem) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-filesystem/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-source-filesystem@2.6.0/packages/gatsby-source-filesystem)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:40:34 +00:00
ce45a87e8e chore(deps): bump @babel/standalone from 7.12.6 to 7.12.7 in /client
Bumps [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone) from 7.12.6 to 7.12.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.7/packages/babel-standalone)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:40:28 +00:00
3c0f62590a chore(deps): bump gatsby-plugin-manifest from 2.6.0 to 2.7.0 in /client
Bumps [gatsby-plugin-manifest](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-manifest) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-manifest/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-manifest@2.7.0/packages/gatsby-plugin-manifest)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:35:27 +00:00
75a6c1d31f chore(deps-dev): bump @testing-library/react in /client
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.1.2 to 11.2.2.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v11.1.2...v11.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:32:16 +00:00
4cc10d7bd0 chore(deps): bump nanoid from 3.1.16 to 3.1.18 in /client
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.16 to 3.1.18.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.16...3.1.18)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-23 05:25:10 +00:00
ea6adccb24 chore(deps-dev): bump @babel/core from 7.12.3 to 7.12.7 in /curriculum
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.12.3 to 7.12.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.7/packages/babel-core)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 06:01:10 +00:00
a267a23888 chore(deps-dev): bump @babel/core from 7.11.6 to 7.12.7 in /api-server
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.11.6 to 7.12.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.7/packages/babel-core)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 05:42:04 +00:00
ef6cbb4da5 chore(deps): bump shortid from 2.2.15 to 2.2.16 in /api-server
Bumps [shortid](https://github.com/dylang/shortid) from 2.2.15 to 2.2.16.
- [Release notes](https://github.com/dylang/shortid/releases)
- [Changelog](https://github.com/dylang/shortid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dylang/shortid/compare/2.2.15...2.2.16)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 05:22:06 +00:00
ce22493371 chore(deps-dev): bump puppeteer from 5.4.1 to 5.5.0 in /curriculum
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.4.1 to 5.5.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v5.4.1...v5.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 05:21:08 +00:00
6dd41c2ebf chore(deps-dev): bump @babel/preset-env in /curriculum
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.12.1 to 7.12.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.7/packages/babel-preset-env)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 05:20:49 +00:00
c0472890dd chore(learn): remove unused dependencies (#40270) 2020-11-21 23:41:10 +05:30
625b12c4f2 feat(Cypress):Add tests for parts of /settings page (#39622)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2020-11-21 23:39:38 +05:30
4c242505b7 fix(eslint): meld into main repo (#40182)
Co-authored-by: Pat Lehmann <patrick.lehmann@homes.com>
2020-11-21 23:36:46 +05:30
bbbc03c379 docs(cypress): create how-to-add-cypress-tests doc (#40262)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2020-11-21 23:34:13 +05:30
b47487b8b2 fix(learn): Change Node project descriptions to all use same template (#40266)
* fix/change-node-project-descriptions-to-all-use-same-template

* fix: use correct boilerplate

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

* fix: add url to link text

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

* fix: add _blank for target attribute

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

* fix: add missing single quote

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

* fix: remove extra lines

* fix: improved wording of description

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>

* fix: move sentence to previous paragraph

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>

* fix: move sentence to previous paragraph

* fix: move sentence to previous paragraph

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
2020-11-20 12:02:31 -08:00
9ba94e38b4 fix(learn): isSorted returning true on empty arrays which passes the test (#40192)
* bug-fix: isSorted returning true on empty arrays

* sorted order test improvements
2020-11-20 09:51:59 -08:00
f4fe5a183b fix(docs): Replace forum link on contribute page (#40275) 2020-11-20 09:05:50 -08:00
5b7ba39f25 chore(deps): bump validator from 10.11.0 to 13.1.17 in /client (#39938)
Bumps [validator](https://github.com/chriso/validator.js) from 10.11.0 to 13.1.17.
- [Release notes](https://github.com/chriso/validator.js/releases)
- [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chriso/validator.js/compare/10.11.0...13.1.17)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-20 18:54:31 +05:30
a6c49543d5 refactor: Cypress CLI args to config file (#40268) 2020-11-20 11:39:34 +01:00
bce3d5b372 fix(learn): remove white space for quick fix (#40231)
* fix(learn): remove white space for quick fix

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
2020-11-20 09:21:21 +01:00
72b8629ecc fix(learn): personal library boilerplate links destination (#40267) 2020-11-19 14:51:59 -08:00
2c9a900353 fix: added more values to list to improve tests (#40256) 2020-11-18 09:38:26 +00:00
aebe53312c chore: Cypress action v1 -> v2 (#40253) 2020-11-17 14:22:15 +03:00
76763272c1 removed background color from offline-warning.css and added wrapper class alert-info (#40237)
* fixed issue offline warning message is hard to read in dark mode

* Update client/src/components/OfflineWarning/OfflineWarning.js

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

* Update client/src/components/OfflineWarning/OfflineWarning.js

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
2020-11-16 14:32:05 +03:00
e39c2d88ad chore(deps-dev): bump chokidar from 2.1.8 to 3.4.3 in /client
Bumps [chokidar](https://github.com/paulmillr/chokidar) from 2.1.8 to 3.4.3.
- [Release notes](https://github.com/paulmillr/chokidar/releases)
- [Commits](https://github.com/paulmillr/chokidar/commits/3.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 10:45:40 +00:00
b95383a73e chore(deps): bump gatsby from 2.25.3 to 2.26.1 in /client
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.25.3 to 2.26.1.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.25.3...gatsby@2.26.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 08:32:54 +00:00
9831df18e0 feat(profile): Add Top Contributor badge feature (#38348)
Co-authored-by: Twaha Rahman <39026437+Twaha-Rahman@users.noreply.github.com>
Co-authored-by: Twaha Rahman <mahi6703890@gmail.com>
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2020-11-16 13:49:45 +05:30
53f40b7f12 chore(deps): bump gatsby-plugin-manifest from 2.5.2 to 2.6.0 in /client
Bumps [gatsby-plugin-manifest](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-manifest) from 2.5.2 to 2.6.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-manifest/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-manifest@2.6.0/packages/gatsby-plugin-manifest)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 08:14:12 +00:00
6d30ad2341 chore(deps): bump gatsby-cli from 2.12.117 to 2.13.1 in /client
Bumps [gatsby-cli](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-cli) from 2.12.117 to 2.13.1.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/gatsby-cli@2.13.1/packages/gatsby-cli/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-cli@2.13.1/packages/gatsby-cli)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 08:13:24 +00:00
7e26c34b4b chore(deps-dev): bump @testing-library/react in /client
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 11.1.0 to 11.1.2.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v11.1.0...v11.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 06:40:30 +00:00
4909bee670 chore(deps): bump gatsby-source-filesystem in /client
Bumps [gatsby-source-filesystem](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-source-filesystem) from 2.4.2 to 2.5.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-filesystem/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-source-filesystem@2.5.0/packages/gatsby-source-filesystem)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 06:37:42 +00:00
5dfcc7c84b chore(deps): bump typescript from 4.0.3 to 4.0.5 in /client
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.3 to 4.0.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.3...v4.0.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 06:25:06 +00:00
e73654f183 chore(deps): bump gatsby-link from 2.4.16 to 2.5.0 in /client
Bumps [gatsby-link](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-link) from 2.4.16 to 2.5.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-link/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-link@2.5.0/packages/gatsby-link)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 06:23:26 +00:00
35119cc71a chore(deps): bump @sentry/node from 5.26.0 to 5.27.4 in /api-server
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.26.0 to 5.27.4.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.26.0...5.27.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-15 05:38:04 +00:00
0434c1e118 chore(deps-dev): bump @babel/node from 7.12.1 to 7.12.6 in /api-server
Bumps [@babel/node](https://github.com/babel/babel/tree/HEAD/packages/babel-node) from 7.12.1 to 7.12.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.6/packages/babel-node)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-15 05:21:42 +00:00
027e08ea58 chore(deps-dev): bump string-similarity in /curriculum
Bumps [string-similarity](https://github.com/aceakash/string-similarity) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/aceakash/string-similarity/releases)
- [Commits](https://github.com/aceakash/string-similarity/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-15 05:19:49 +00:00
c03beb3ca6 Fix tests to allow spaces in "Sass: Create Reusable CSS with Mixins" (#40230)
* Fix tests to allow spaces. Closes #40212

* Apply suggestions from code review

Remove redundant whitespace from regex

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
2020-11-15 00:14:47 +01:00
1ef49d2c57 fix(learn): add note about tweet button restrictions (#40118)
* fix: add note about tweet button restrictions

* fix: added target blank and top hint
2020-11-14 11:52:48 +00:00
f06b825a1c Bug(learn) - List item's font size larger than surrounding text (#40224)
* #40220 Bug(learn) - List item's font size larger than surrounding text

* #40220 move description css in challenge-description.css

* Update client/src/templates/Challenges/components/challenge-description.css

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
2020-11-13 13:56:36 -06:00
273f1d1aed fix(learn): typo in an answer to the Numpy question (#40227)
* fix: typo in an answer to the Numpy question

* fix: revert typo in Chinese file
2020-11-13 13:52:13 -06:00
5a9680a1a6 feat(learn): Add Tests to Issue Tracker Project, Remove InfoSec Tests (#39627)
* Feature: Add Tests to Issue Tracker Project

* Refactored User Stories

* Apply suggestions from code review

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

* Modify verbiage for #39721

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
2020-11-12 19:51:09 -08:00
bd593667f6 feat(learn): Add tests to Personal Library (#39642)
* Resolve Merge Conflict

* Add Instructions, Reformat Description

* Update curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>

* Update curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

* Update curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md

* Change links to Markdown style

* Apply suggestions from code review

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

* Apply suggestions from code review

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

* Verbiage per #39721

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

* Update curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

* Update curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
2020-11-12 16:13:00 -06:00
11dfe9274f fix catastrophic backtracking when removing HTML comments (#40223)
* fix catastrophic backtracking when removing HTML comments

The regexp `/<!--(.|\s)*?-->/g` can experience catastrophic backtracking while matching a string like `<!--                                           -- >` (notice how it does not end with `-->`).    

[You can see the catastrophic backtracking in action here](https://regex101.com/r/2jvwFi/1/debugger). 

This is because both `.` and `\s` matches the space character, and there are therefore a large number of possible ways for `(.|\s)*` to match a long sequence of spaces.  
The regexp evaluator is greedy, and the problem therefore only exists when the string does not match the regexp. 

The fix is simply to remove the ambiguity such that there is only one possible way for the regexp to match a sequence of white-space.

* Update client/src/utils/curriculum-helpers.js

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2020-11-12 08:20:34 -08:00