Skip to content

Prevent parse of invalid html tags #124

Description

@nicoleCamoro

Expected Behavior

Parser should ignore invalid html "tags".

Actual Behavior

I receive this error in the console :
DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('someone@gmail.com') is not a valid name.

Steps to Reproduce

I'm parsing an email body and one of it's contents has this format: <an,email@gmail.com>

var parse = require('html-react-parser');
parse("<p><someone@gmail.com></p>");

Environment

  • Version: 0.6.4
  • Platform: Windows 10
  • Browser: Google Chrome 77.0.3865.90

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions