From 52e96915e296dd44bdba712b113cdd2aea4cb5ad Mon Sep 17 00:00:00 2001 From: Vladislav Manchev Date: Mon, 9 May 2016 02:13:06 +0300 Subject: [PATCH] check-templates: Allow HTML tag brackets inside tag attributes. --- tools/check-templates | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/check-templates b/tools/check-templates index 8911853a0f..07b568f849 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -157,8 +157,11 @@ def get_django_tag(text, i): return s def get_html_tag(text, i): + quote_count = 0 end = i + 1 - while end < len(text) and text[end] != '>': + while end < len(text) and (text[end] != '>' or quote_count % 2 != 0): + if text[end] == '"': + quote_count += 1 end += 1 if text[end] != '>': raise Exception('Tag missing >')