Fixes semicolon parsing within a url

This is a different implementation than
828d4c801a5a9266d261ae2a770d1991cb46303b

It is also downcasing the base64 encoded data, which could cause
collision issues, but encoded images are so uncommon that I don't think
it will be a big issue. For now.

refs: #46