From b46750cfc6394513fdd628a86e64debdd716150e Mon Sep 17 00:00:00 2001 From: Elias Showk Date: Tue, 22 May 2018 18:13:46 +0200 Subject: [PATCH] list of forms: wrap the title into a span (#23977) --- combo/apps/wcs/templates/combo/wcs/current_drafts.html | 2 +- combo/apps/wcs/templates/combo/wcs/list_of_forms.html | 2 +- tests/test_wcs.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/combo/apps/wcs/templates/combo/wcs/current_drafts.html b/combo/apps/wcs/templates/combo/wcs/current_drafts.html index a584fe5..f7efa7d 100644 --- a/combo/apps/wcs/templates/combo/wcs/current_drafts.html +++ b/combo/apps/wcs/templates/combo/wcs/current_drafts.html @@ -7,7 +7,7 @@ {% for data in forms.data %} {% if data.url and data.title and not data.form_status_is_endpoint %}
  • {{ data.name }} + href="{{ data.url }}">{{ data.name }} {{data.datetime|strptime:"%Y-%m-%d %H:%M:%S"}} {% trans 'draft' %}
  • {% endif %} diff --git a/combo/apps/wcs/templates/combo/wcs/list_of_forms.html b/combo/apps/wcs/templates/combo/wcs/list_of_forms.html index 649f7bd..bc53666 100644 --- a/combo/apps/wcs/templates/combo/wcs/list_of_forms.html +++ b/combo/apps/wcs/templates/combo/wcs/list_of_forms.html @@ -3,7 +3,7 @@ {% for data in forms.data|dictsortreversed:"form_receipt_datetime" %} {% if data.url and data.title %}
  • {{ data.name }} + href="{{ data.url }}">{{data.name}} {{data.form_number}} {{data.status}}
  • {% endif %} diff --git a/tests/test_wcs.py b/tests/test_wcs.py index 462dd56..a1ed6fd 100644 --- a/tests/test_wcs.py +++ b/tests/test_wcs.py @@ -496,7 +496,7 @@ def test_current_drafts_cell_render_logged_in(context): # default is to get current forms from all wcs sites result = cell.render(context) assert 'http://127.0.0.1:8999/third-form-title/1' in result - for url in re.findall('href="(.*)"', result): + for url in re.findall(r'href=[\'"]?([^\'" >]+)', result): check_wcs_open(url) # check flat list -- 2.17.0