gchq / gchq/CyberChef

Feature request: Only minimal required HTML/XML Entities in "To HTML Entity"

Open
#1,186 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
35.8k
Forks
4.1k
Avg merge
2d 26m
Merged PRs (30d)
33

Description

**Is your feature request related to a problem? Please describe.**
The `To HTML Entity` Operation is polluted to an almost unusable point now. Most of the time I want it to replace `<`, `>`, `&` and `"` - nothing more. It did that years ago. But today it almost replaces everything that's not a simple letter or number.
Why does it replace `?!.,+=`?!

**Describe the solution you'd like**
Add an option that only replaces `<`, `>`, `&` and `"` (maybe `'`) along with `Convert all characters`

**Describe alternatives you've considered**
none

**Additional context**
This is what it produces now:
```xml
The `To HTML Entity` Operation is polluted to an almost unusable point now.
Most of the time I want it to replace `<`, `>`,
`&` and `"` - nothing more. It did that years ago.
But today it almost replaces everything that's not a simple letter or number.
Why does it replace `?!.,+=`?!
```

Contributor guide

Open the contributing guide

Research direction

Start by locating the `To HTML Entity` operation and its existing tests or configuration. Add an option alongside `Convert all characters` that limits replacement to the listed required entities, then verify that punctuation remains unchanged and the existing behavior still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.