Skip to content

dangerouslySetInnerHTML not reconciling for P tags - likely due to nested P tags #5479

Closed
@Surreal9

Description

@Surreal9

I noticed when trying to use dangerouslySetInnerHTML for a P tag in a tutorial app I am building, it was having weird behaviour when the content was being changed. I am able to get the desired behaviour by using a div or span instead. I am using React 0.14.2.

This might be similar to #377

To view, check out this branch:
https://github.com/Surreal9/react-tutorial-journal-app/tree/bug/broken-edit-with-marked-and-p-tag

Steps to repro:

  • Run the app, add a post
  • Click the 'edit' icon next to the new post
  • Edit the text, and hit 'Update Post'
  • You should see the old post text still displayed, along with the newly updated text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions