diff --git a/wagtail/admin/templates/wagtailadmin/chooser/tables/parent_page_cell.html b/wagtail/admin/templates/wagtailadmin/chooser/tables/parent_page_cell.html
index c8aa24d937..ad754ae243 100644
--- a/wagtail/admin/templates/wagtailadmin/chooser/tables/parent_page_cell.html
+++ b/wagtail/admin/templates/wagtailadmin/chooser/tables/parent_page_cell.html
@@ -1,7 +1,7 @@
{% load wagtailadmin_tags %}
{% if value %}
- {{ value.get_admin_display_title }}
+ {{ value.get_admin_display_title }}
{% if show_locale_labels %}{% status value.locale.get_display_name classname="w-status--label" %}{% endif %}
{% endif %}
|
diff --git a/wagtail/admin/tests/test_page_chooser.py b/wagtail/admin/tests/test_page_chooser.py
index 1114226865..5ec5cfbdba 100644
--- a/wagtail/admin/tests/test_page_chooser.py
+++ b/wagtail/admin/tests/test_page_chooser.py
@@ -371,12 +371,22 @@ class TestChooserSearch(WagtailTestUtils, TransactionTestCase):
return self.client.get(reverse("wagtailadmin_choose_page_search"), params or {})
def test_simple(self):
- response = self.get({"q": "foobarbaz"})
+ response = self.get({"q": "foobarbaz", "allow_external_link": "true"})
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "wagtailadmin/chooser/_search_results.html")
self.assertContains(response, "There is 1 match")
self.assertContains(response, "foobarbaz")
+ # parent page link should preserve the allow_external_link parameter
+ expected_url = (
+ reverse("wagtailadmin_choose_page_child", args=[self.root_page.id])
+ + "?allow_external_link=true"
+ )
+ self.assertContains(
+ response,
+ f'{self.root_page.title}',
+ )
+
def test_partial_match(self):
response = self.get({"q": "fooba"})
self.assertEqual(response.status_code, 200)