[whatwg] Little canvas toDataUrl

Hello, list.

Spec says <http://www.whatwg.org/specs/web-apps/current-work/#todataurl>:

> When trying to use types other than image/png, authors can check if
> the image was really returned in the requested format by checking to
> see if the returned string starts with the exact string
> "data:image/png" or not. If it does, the image is PNG, and thus the
> requested type was not supported.

This should probably be ammended to starting with one of these exact
strings: "data:image/png," or "data:image/png;". This ensures that no
future content type that starts with "image/png" can break the
application.

Received on Wednesday, 26 April 2006 18:04:14 UTC