microsoft / microsoft/Game-Control-Puzzle-Event-Administration-Tools
Setting an HTML content item with no text in it crashes the page
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
The code at https://github.com/microsoft/Game-Control-Puzzle-Event-Administration-Tools/blob/ec1f7cf8a9799f60a53349e735d143736ccb50d5/client/src/components/staff/presentation/AdditionalContent.tsx#L30 sets the innerHtml of a particular ToCItem's page when a HTML content item is set.
If someone purposefully or accidentally creates an empty HTML content item, stringContent is null and the entire page crashes.
We should either input validate content before we set a null item or we should gracefully handle empty htmlContent (ideally both).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in client/src/components/staff/presentation/AdditionalContent.tsx at the referenced line and trace how an HTML content item supplies stringContent to the page. Ensure an empty item is validated or handled without crashing, and verify that selecting one leaves the page usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100