jpuri / jpuri/draftjs-to-html

React's dangerouslySetInnerHTML

Open
#35 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
325
Forks
139
PR merge metrics
No merged PRs in 30d

Description

Is it safe to use draftToHTML the content inside react using dangerouslySetInnerHTML without sanitizing? I'm assuming because there are only limited html tags this package supports to convert. Also how would I sanitize the draftjs content to be safe?
Sorry I asked this in stackoverflow but no real response yet.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the draftToHTML output, React's dangerouslySetInnerHTML guidance, and the DraftJS content handling described in the issue. Done means documenting whether sanitization is required and identifying a safe sanitization approach, with the supported HTML tags considered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation, frontend, security
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.