Ensure app origin is encoded (bug 1065006)