Fix using non-strings as anchors
Previously, non-strings passed to _anchor would be converted to strings.
Restore this ability. The logic is the same as in url_quote.
Fixes: c4b39ba2 ("replace werkzeug.urls with urllib.parse")
This commit is contained in:
parent
cb825687a5
commit
547f2b7f1e
3 changed files with 4 additions and 0 deletions
|
|
@ -106,6 +106,7 @@ class TestUrlFor:
|
|||
return "42"
|
||||
|
||||
assert flask.url_for("index", _anchor="x y") == "/#x%20y"
|
||||
assert flask.url_for("index", _anchor=5) == "/#5"
|
||||
|
||||
def test_url_for_with_scheme(self, app, req_ctx):
|
||||
@app.route("/")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue