Bug report: Tooltip over Base64 Offset not complete
- Dominant language
- JavaScript
- Stars
- 35.8k
- Forks
- 4.1k
- Avg merge
- 2d 26m
- Merged PRs (30d)
- 33
Description
**Describe the bug**
When using the Base64 Offset Operation and hovering over the Offsets, the tooltip shows less of the decoded text than it should.
**To Reproduce**
1. Use Show Base64 offsets Operation
2. Test123 as input
3. Hover over "Offset 0" in Output
4. Tooltip shows "Test1" instead of "Test12"
OR
[Link to reproduce](https://gchq.github.io/CyberChef/#recipe=Show_Base64_offsets('A-Za-z0-9%2B/%3D',true,'Raw')&input=VGVzdDEyMw)
--> Offset0 tooltip shows "Test1" instead of "Test12"
**Expected behaviour**
Tooltip should contain Test12 as "VGVzdDEyM" decodes to at least Test12
**Screenshots**

**Desktop (if relevant, please complete the following information):**
* Version: 9.28.0
* Compile time: 26/03/2021 14:12:01 UTC
* User-Agent:
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
* [Link to reproduce](https://gchq.github.io/CyberChef/#recipe=Show_Base64_offsets('A-Za-z0-9%2B/%3D',true,'Raw')&input=VGVzdDEyMw)
**Additional context**
This happens with almost all Input but differs in which Offset is displayed badly.
Depending on the input, the tooltip sometimes cuts up to 2 chars. [Example - Offset 2](https://gchq.github.io/CyberChef/#recipe=From_Hex('Space'/disabled)From_Base64('A-Za-z0-9%2B/%3D',true)Decode_text('UTF-8%20(65001)'/disabled)To_Binary('Space',8/disabled)To_Base64('A-Za-z0-9%2B/%3D'/disabled)&input=QUFCZlZHVnpkREV5TTJGaFlX)
Contributor guide
Research direction
Start with the linked CyberChef reproduction and the Show Base64 offsets operation, using the Offset 0 tooltip for input Test123. Trace how the tooltip text is produced and verify the fix by checking that it includes Test12 rather than Test1, including the additional offset example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100