[Qt] Fixup urls from user input for WebKit1
Created attachment 178006 [details] Patch
Ahh, that's what you meant. I disagree with it. I recall from discussions that in the past we decided against sanitizing after the API layer but instead require people to feed in valid QUrl objects in the first place.
If we do QUrl::fromUserInput(url.toString()) we do run the risk of data loss. It would be different if we had a load(QString) function, but as it is today we do take a QUrl object as parameter and if that's not valid (isValid()) returning false I don't think we should try to "fix it up" at the risk of breaking a valid url because of some behaviour in fromUserInput. Similarly in QString:find(QRegExp) we also don't try to fix up the regex if it's not valid :)
Comment on attachment 178006 [details] Patch As it turns out, there was no regression there, and this already was the behavior in Qt4... After consultation with Jocelyn, it seems what we could do to make this nicer is add a load(const QString&) overload.