diff --git a/src/gmnlm.c b/src/gmnlm.c

index 10b179b1922dab1f711b8eb0fd150f5a5aca30e6..e1a488a1f06b8290b37299be406b762957b175cc 100644

--- a/src/gmnlm.c

+++ b/src/gmnlm.c

@@ -543,7 +543,9 @@ char *new_url = gemini_input_url(

browser->plain_url, input);

free(input);

assert(new_url);

- set_url(browser, new_url, NULL);

+ set_url(browser, new_url,

+ resp->status == GEMINI_STATUS_SENSITIVE_INPUT ?

+ NULL : &browser->history);

free(new_url);

break;

case GEMINI_STATUS_CLASS_REDIRECT: