Dictionary key repr not escaped.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Seems related to the very old #81 in that certain values (dictionary keys, in our case) are not escaped.
Use of `repr()` as keys results in apparently no keys. (Web inspector shows that they're being interpreted as HTML.)
### MCVE
Enter the following in a presented interactive REPL or traceback:
```python
{'Testing': 'value'}
```
Or, attempt to use the REPR of a class as keys:
```python
{repr(type): 'value'}
```
This was exceptionally confusing when our plugin registry showed an empty string for every key.
### Screenshot
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the interactive REPL or traceback rendering path described in the MCVE, and inspect how dictionary keys and class repr values are inserted into the web inspector. Reproduce the HTML-valued key and the repr(type) case; done means both keys display visibly instead of being interpreted as HTML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100