From 699a5eec68686b41372dc4b6c5e02320c62a2ce4 Mon Sep 17 00:00:00 2001 From: Aleksey Zhukov Date: Tue, 23 May 2017 18:27:18 +0300 Subject: [PATCH] Docs: slugify HTML IDs so they're restricted to alphanumerics and dashes This is a precaution to avoid JS breaking if some routes would contain something that doesn't fit well into CSS `#some-id` selectors, e.g. semicolons or parens. --- .../rest_framework/docs/_recursive_document.html | 4 ++-- .../templates/rest_framework/docs/_recursive_menu.html | 8 ++++---- rest_framework/templates/rest_framework/docs/link.html | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rest_framework/templates/rest_framework/docs/_recursive_document.html b/rest_framework/templates/rest_framework/docs/_recursive_document.html index fcdbf5c80..b001193a4 100644 --- a/rest_framework/templates/rest_framework/docs/_recursive_document.html +++ b/rest_framework/templates/rest_framework/docs/_recursive_document.html @@ -1,9 +1,9 @@ {% load rest_framework %} {% for section_key, section in items %} {% if section_key %} - + {{ section_key }} - + {% endif %} diff --git a/rest_framework/templates/rest_framework/docs/_recursive_menu.html b/rest_framework/templates/rest_framework/docs/_recursive_menu.html index bb86a87c5..cebf30717 100644 --- a/rest_framework/templates/rest_framework/docs/_recursive_menu.html +++ b/rest_framework/templates/rest_framework/docs/_recursive_menu.html @@ -1,14 +1,14 @@ {% load rest_framework %} {% if items %} -