Skip to content

Commit

Permalink
OPEN-3192: Handle record ID's with slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
thriuin committed Mar 5, 2024
1 parent 5d5f9cc commit c4e6945
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions oc_search/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
path('search/<str:lang>/', HomeView.as_view(), name="HomePage"),
path('search/<str:lang>/<str:search_type>/', SearchView.as_view(), name="SearchForm"),
path('rechercher/<str:lang>/<str:search_type>/', SearchView.as_view(), name="SearchForm"),
path('search/<str:lang>/<str:search_type>/record/<str:record_id>', RecordView.as_view(), name='RecordForm'),
path('search/<str:lang>/<str:search_type>/record/<path:record_id>', RecordView.as_view(), name='RecordForm'),
path('search/<str:lang>/<str:search_type>/export/', ExportView.as_view(), name='ExportForm'),
path('search/<str:lang>/<str:search_type>/download/<str:task_id>', DownloadSearchResultsView.as_view(), name='DownloadForm'),
path('rechercher/<str:lang>/<str:search_type>/telecharger/<str:task_id>', DownloadSearchResultsView.as_view(), name='DownloadForm'),
Expand All @@ -59,9 +59,9 @@
path('', DefaultView.as_view(), name="HomePage"),
path(settings.SEARCH_HOST_PATH, HomeView.as_view(), name="HomePage"),
path(settings.SEARCH_HOST_PATH + '<str:search_type>/', SearchView.as_view(), name="SearchForm"),
path(settings.SEARCH_HOST_PATH + 'record/<str:search_type>/<str:record_id>', RecordView.as_view(),
path(settings.SEARCH_HOST_PATH + 'record/<str:search_type>/<path:record_id>', RecordView.as_view(),
name='RecordForm'),
path(settings.SEARCH_HOST_PATH + '<str:search_type>/record/<str:record_id>', RecordView.as_view(),
path(settings.SEARCH_HOST_PATH + '<str:search_type>/record/<path:record_id>', RecordView.as_view(),
name='RecordForm'),
path(settings.SEARCH_HOST_PATH + '<str:search_type>/export/', ExportView.as_view(), name='RecordForm'),
path(settings.SEARCH_HOST_PATH + '<str:search_type>/download/<str:task_id>', DownloadSearchResultsView.as_view(), name='DownloadForm'),
Expand Down
3 changes: 0 additions & 3 deletions search/templates/snippets/default_record_breadcrumb.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
},{
"title": "{% translate 'Open Government' %}",
"href": "{% translate 'https://open.canada.ca' %}/{{ LANGUAGE_CODE }}",
},{
"title": "{% translate 'Proactive Disclosure' %}",
"href": "{% translate 'https://open.canada.ca/en/proactive-disclosure' %}",
},{
"title": "{{ search_title }}",
"href": "{{ parent_path }}",
Expand Down

0 comments on commit c4e6945

Please sign in to comment.