[whatwg] Little canvas toDataUrl

On Wed, 26 Apr 2006, Lenny Domnitser wrote:
>
> 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.

Thanks, fixed.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 1 May 2006 16:06:40 UTC