The errors='replace' parameter to force_text altered the URL before checking it, which wasn't considered sane. Refs 24fc935218 and ada7a4aef.
24fc935218
ada7a4aef
This fixes a regression introduced by c5544d2892. Thanks John Eskew for the reporti and Tim Graham for the review.
c5544d2892