Allow data uri scheme see #6814
Improving query, fixing PHP warnings.
Merge