From 791f7a2404efa3e0110f05cebf5f12777820a3a1 2013-04-12 22:07:54 From: MinRK Date: 2013-04-12 22:07:54 Subject: [PATCH] don't test for .ipynb in redirect handler regex already guarantees it --- diff --git a/IPython/frontend/html/notebook/handlers.py b/IPython/frontend/html/notebook/handlers.py index 5b118a0..dd3eef4 100644 --- a/IPython/frontend/html/notebook/handlers.py +++ b/IPython/frontend/html/notebook/handlers.py @@ -614,8 +614,8 @@ class NotebookRedirectHandler(AuthenticatedHandler): @authenticate_unless_readonly def get(self, notebook_name): app = self.application - if notebook_name.endswith('.ipynb'): - notebook_name = notebook_name[:-6] + # strip trailing .ipynb: + notebook_name = os.path.splitext(notebook_name)[0] notebook_id = app.notebook_manager.rev_mapping.get(notebook_name, '') if notebook_id: url = self.settings.get('base_project_url', '/') + notebook_id