Skip to content

Challenge freezing on incorrect input #39101

@ojeytonwilliams

Description

@ojeytonwilliams

Describe your problem and how to reproduce it:
The Define the Head and Body of an HTML Document challenge freezes if you enter in code like

<!DOCTYPE html>
<html>
  <head>
    <title>The best page ever</title>
  <head>

  <body>
    <h1>The best page ever</h1>
    <p>Cat ipsum dolor sit amet, jump </p>
  <body> <!-- this tag should be closing -->
</html>

where the body tag is not closed. This is a common enough mistake and the freezing is not directly caused by the user code - it's how our tests interact with it.

Add a Link to the page with the problem:

https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/define-the-head-and-body-of-an-html-document

The cause

The last test causes the problem, I think the regex gets stuck in a loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions