prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  CKEditor Image upload makes the GUI undismissable
  The browser keeps the changed fields state after the image is uploaded, and for some reason we're unable to dismiss the gui.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `app/config/urls.py`
  Content:
  ```
  1 from django.conf import settings
  2 from django.conf.urls import include
  3 from django.contrib import admin
  4 from django.template.response import TemplateResponse
  5 from django.urls import re_path, path
  6 from django.views.generic import TemplateView, RedirectView
  7 
  8 from grandchallenge.core.views import comicmain
  9 from grandchallenge.pages.views import FaviconView
  10 
  11 admin.autodiscover()
  12 
  13 
  14 def handler500(request):
  15     context = {"request": request}
  16     template_name = "500.html"
  17     return TemplateResponse(request, template_name, context, status=500)
  18 
  19 
  20 urlpatterns = [
  21     path("", comicmain, name="home"),
  22     path(
  23         "robots.txt/",
  24         TemplateView.as_view(
  25             template_name="robots.txt", content_type="text/plain"
  26         ),
  27     ),
  28     # Favicons
  29     path(
  30         "favicon.ico/",
  31         FaviconView.as_view(rel="shortcut icon"),
  32         name="favicon",
  33     ),
  34     path(
  35         "apple-touch-icon.png/",
  36         FaviconView.as_view(rel="apple-touch-icon"),
  37         name="apple-touch-icon",
  38     ),
  39     path(
  40         "apple-touch-icon-precomposed.png/",
  41         FaviconView.as_view(rel="apple-touch-icon-precomposed"),
  42         name="apple-touch-icon-precomposed",
  43     ),
  44     path(
  45         "apple-touch-icon-<int:size>x<int>.png/",
  46         FaviconView.as_view(rel="apple-touch-icon"),
  47         name="apple-touch-icon-sized",
  48     ),
  49     path(
  50         "apple-touch-icon-<int:size>x<int>-precomposed.png/",
  51         FaviconView.as_view(rel="apple-touch-icon-precomposed"),
  52         name="apple-touch-icon-precomposed-sized",
  53     ),
  54     path(settings.ADMIN_URL, admin.site.urls),
  55     path(
  56         "site/<slug:challenge_short_name>/",
  57         include("grandchallenge.core.urls"),
  58         name="site",
  59     ),
  60     path(
  61         "stats/",
  62         include("grandchallenge.statistics.urls", namespace="statistics"),
  63     ),
  64     # Do not change the api namespace without updating the view names in
  65     # all of the serializers
  66     path("api/", include("grandchallenge.api.urls", namespace="api")),
  67     # Used for logging in and managing grandchallenge.profiles. This is done on
  68     # the framework level because it is too hard to get this all under each
  69     # project
  70     path("accounts/", include("grandchallenge.profiles.urls")),
  71     path("socialauth/", include("social_django.urls", namespace="social")),
  72     path(
  73         "challenges/",
  74         include("grandchallenge.challenges.urls", namespace="challenges"),
  75     ),
  76     re_path(
  77         r"^(?i)all_challenges/$",
  78         RedirectView.as_view(pattern_name="challenges:list", permanent=False),
  79     ),
  80     path("cases/", include("grandchallenge.cases.urls", namespace="cases")),
  81     path(
  82         "algorithms/",
  83         include("grandchallenge.algorithms.urls", namespace="algorithms"),
  84     ),
  85     # ========== catch all ====================
  86     # when all other urls have been checked, try to load page from main project
  87     # keep this url at the bottom of this list, because urls are checked in
  88     # order
  89     path("<slug:page_title>/", comicmain, name="mainproject-home"),
  90     path(
  91         "media/", include("grandchallenge.serving.urls", namespace="serving")
  92     ),
  93 ]
  94 if settings.DEBUG and settings.ENABLE_DEBUG_TOOLBAR:
  95     import debug_toolbar
  96 
  97     urlpatterns = [
  98         path("__debug__/", include(debug_toolbar.urls))
  99     ] + urlpatterns
  100
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/app/config/urls.py b/app/config/urls.py
  --- a/app/config/urls.py
  +++ b/app/config/urls.py
  @@ -73,8 +73,12 @@
           "challenges/",
           include("grandchallenge.challenges.urls", namespace="challenges"),
       ),
  -    re_path(
  -        r"^(?i)all_challenges/$",
  +    path(
  +        "all_challenges/",
  +        RedirectView.as_view(pattern_name="challenges:list", permanent=False),
  +    ),
  +    path(
  +        "All_Challenges/",
           RedirectView.as_view(pattern_name="challenges:list", permanent=False),
       ),
       path("cases/", include("grandchallenge.cases.urls", namespace="cases")),
  
verification_info: {"golden_diff": "diff --git a/app/config/urls.py b/app/config/urls.py\n--- a/app/config/urls.py\n+++ b/app/config/urls.py\n@@ -73,8 +73,12 @@\n         \"challenges/\",\n         include(\"grandchallenge.challenges.urls\", namespace=\"challenges\"),\n     ),\n-    re_path(\n-        r\"^(?i)all_challenges/$\",\n+    path(\n+        \"all_challenges/\",\n+        RedirectView.as_view(pattern_name=\"challenges:list\", permanent=False),\n+    ),\n+    path(\n+        \"All_Challenges/\",\n         RedirectView.as_view(pattern_name=\"challenges:list\", permanent=False),\n     ),\n     path(\"cases/\", include(\"grandchallenge.cases.urls\", namespace=\"cases\")),\n", "issue": "CKEditor Image upload makes the GUI undismissable\nThe browser keeps the changed fields state after the image is uploaded, and for some reason we're unable to dismiss the gui.\n", "before_files": [{"content": "from django.conf import settings\nfrom django.conf.urls import include\nfrom django.contrib import admin\nfrom django.template.response import TemplateResponse\nfrom django.urls import re_path, path\nfrom django.views.generic import TemplateView, RedirectView\n\nfrom grandchallenge.core.views import comicmain\nfrom grandchallenge.pages.views import FaviconView\n\nadmin.autodiscover()\n\n\ndef handler500(request):\n    context = {\"request\": request}\n    template_name = \"500.html\"\n    return TemplateResponse(request, template_name, context, status=500)\n\n\nurlpatterns = [\n    path(\"\", comicmain, name=\"home\"),\n    path(\n        \"robots.txt/\",\n        TemplateView.as_view(\n            template_name=\"robots.txt\", content_type=\"text/plain\"\n        ),\n    ),\n    # Favicons\n    path(\n        \"favicon.ico/\",\n        FaviconView.as_view(rel=\"shortcut icon\"),\n        name=\"favicon\",\n    ),\n    path(\n        \"apple-touch-icon.png/\",\n        FaviconView.as_view(rel=\"apple-touch-icon\"),\n        name=\"apple-touch-icon\",\n    ),\n    path(\n        \"apple-touch-icon-precomposed.png/\",\n        FaviconView.as_view(rel=\"apple-touch-icon-precomposed\"),\n        name=\"apple-touch-icon-precomposed\",\n    ),\n    path(\n        \"apple-touch-icon-<int:size>x<int>.png/\",\n        FaviconView.as_view(rel=\"apple-touch-icon\"),\n        name=\"apple-touch-icon-sized\",\n    ),\n    path(\n        \"apple-touch-icon-<int:size>x<int>-precomposed.png/\",\n        FaviconView.as_view(rel=\"apple-touch-icon-precomposed\"),\n        name=\"apple-touch-icon-precomposed-sized\",\n    ),\n    path(settings.ADMIN_URL, admin.site.urls),\n    path(\n        \"site/<slug:challenge_short_name>/\",\n        include(\"grandchallenge.core.urls\"),\n        name=\"site\",\n    ),\n    path(\n        \"stats/\",\n        include(\"grandchallenge.statistics.urls\", namespace=\"statistics\"),\n    ),\n    # Do not change the api namespace without updating the view names in\n    # all of the serializers\n    path(\"api/\", include(\"grandchallenge.api.urls\", namespace=\"api\")),\n    # Used for logging in and managing grandchallenge.profiles. This is done on\n    # the framework level because it is too hard to get this all under each\n    # project\n    path(\"accounts/\", include(\"grandchallenge.profiles.urls\")),\n    path(\"socialauth/\", include(\"social_django.urls\", namespace=\"social\")),\n    path(\n        \"challenges/\",\n        include(\"grandchallenge.challenges.urls\", namespace=\"challenges\"),\n    ),\n    re_path(\n        r\"^(?i)all_challenges/$\",\n        RedirectView.as_view(pattern_name=\"challenges:list\", permanent=False),\n    ),\n    path(\"cases/\", include(\"grandchallenge.cases.urls\", namespace=\"cases\")),\n    path(\n        \"algorithms/\",\n        include(\"grandchallenge.algorithms.urls\", namespace=\"algorithms\"),\n    ),\n    # ========== catch all ====================\n    # when all other urls have been checked, try to load page from main project\n    # keep this url at the bottom of this list, because urls are checked in\n    # order\n    path(\"<slug:page_title>/\", comicmain, name=\"mainproject-home\"),\n    path(\n        \"media/\", include(\"grandchallenge.serving.urls\", namespace=\"serving\")\n    ),\n]\nif settings.DEBUG and settings.ENABLE_DEBUG_TOOLBAR:\n    import debug_toolbar\n\n    urlpatterns = [\n        path(\"__debug__/\", include(debug_toolbar.urls))\n    ] + urlpatterns\n", "path": "app/config/urls.py"}], "after_files": [{"content": "from django.conf import settings\nfrom django.conf.urls import include\nfrom django.contrib import admin\nfrom django.template.response import TemplateResponse\nfrom django.urls import re_path, path\nfrom django.views.generic import TemplateView, RedirectView\n\nfrom grandchallenge.core.views import comicmain\nfrom grandchallenge.pages.views import FaviconView\n\nadmin.autodiscover()\n\n\ndef handler500(request):\n    context = {\"request\": request}\n    template_name = \"500.html\"\n    return TemplateResponse(request, template_name, context, status=500)\n\n\nurlpatterns = [\n    path(\"\", comicmain, name=\"home\"),\n    path(\n        \"robots.txt/\",\n        TemplateView.as_view(\n            template_name=\"robots.txt\", content_type=\"text/plain\"\n        ),\n    ),\n    # Favicons\n    path(\n        \"favicon.ico/\",\n        FaviconView.as_view(rel=\"shortcut icon\"),\n        name=\"favicon\",\n    ),\n    path(\n        \"apple-touch-icon.png/\",\n        FaviconView.as_view(rel=\"apple-touch-icon\"),\n        name=\"apple-touch-icon\",\n    ),\n    path(\n        \"apple-touch-icon-precomposed.png/\",\n        FaviconView.as_view(rel=\"apple-touch-icon-precomposed\"),\n        name=\"apple-touch-icon-precomposed\",\n    ),\n    path(\n        \"apple-touch-icon-<int:size>x<int>.png/\",\n        FaviconView.as_view(rel=\"apple-touch-icon\"),\n        name=\"apple-touch-icon-sized\",\n    ),\n    path(\n        \"apple-touch-icon-<int:size>x<int>-precomposed.png/\",\n        FaviconView.as_view(rel=\"apple-touch-icon-precomposed\"),\n        name=\"apple-touch-icon-precomposed-sized\",\n    ),\n    path(settings.ADMIN_URL, admin.site.urls),\n    path(\n        \"site/<slug:challenge_short_name>/\",\n        include(\"grandchallenge.core.urls\"),\n        name=\"site\",\n    ),\n    path(\n        \"stats/\",\n        include(\"grandchallenge.statistics.urls\", namespace=\"statistics\"),\n    ),\n    # Do not change the api namespace without updating the view names in\n    # all of the serializers\n    path(\"api/\", include(\"grandchallenge.api.urls\", namespace=\"api\")),\n    # Used for logging in and managing grandchallenge.profiles. This is done on\n    # the framework level because it is too hard to get this all under each\n    # project\n    path(\"accounts/\", include(\"grandchallenge.profiles.urls\")),\n    path(\"socialauth/\", include(\"social_django.urls\", namespace=\"social\")),\n    path(\n        \"challenges/\",\n        include(\"grandchallenge.challenges.urls\", namespace=\"challenges\"),\n    ),\n    path(\n        \"all_challenges/\",\n        RedirectView.as_view(pattern_name=\"challenges:list\", permanent=False),\n    ),\n    path(\n        \"All_Challenges/\",\n        RedirectView.as_view(pattern_name=\"challenges:list\", permanent=False),\n    ),\n    path(\"cases/\", include(\"grandchallenge.cases.urls\", namespace=\"cases\")),\n    path(\n        \"algorithms/\",\n        include(\"grandchallenge.algorithms.urls\", namespace=\"algorithms\"),\n    ),\n    # ========== catch all ====================\n    # when all other urls have been checked, try to load page from main project\n    # keep this url at the bottom of this list, because urls are checked in\n    # order\n    path(\"<slug:page_title>/\", comicmain, name=\"mainproject-home\"),\n    path(\n        \"media/\", include(\"grandchallenge.serving.urls\", namespace=\"serving\")\n    ),\n]\nif settings.DEBUG and settings.ENABLE_DEBUG_TOOLBAR:\n    import debug_toolbar\n\n    urlpatterns = [\n        path(\"__debug__/\", include(debug_toolbar.urls))\n    ] + urlpatterns\n", "path": "app/config/urls.py"}]}