base64 encoding a canvas does not actually specify base64 encoding
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 718
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
The algorithm for encoding a canvas element to abse64 effectively says to convert it into a data url and then remove the url part, leaving only the data part after the comma.
This is a weird way of specifying things (print does it much better, it simply says to base64 encode the pdf file - why not just say base64 encode the png file?).
The real problem is, however, that this does not result in base464 encoded data - the algorithm only says to encode it in "a" data url, but fails to enforce that it must be a base64 data url (as opposed to uri-escaped or any other encodings which are legal for data urls).
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 with the canvas element encoding algorithm and compare its data URL wording with the print algorithm mentioned in the issue. Update the specification so canvas output is explicitly base64 encoded rather than allowing any valid data URL encoding. Confirm the revised text clearly requires base64 data after the URL prefix is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100