From 979809c5a80aaf26bf7e3406a2e361e809f9b132 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 13 Jul 2018 00:35:08 -0400 Subject: Manipulation: Properly detect HTML elements with single-character names Fixes gh-4124 Closes gh-4125 --- src/manipulation/var/rtagName.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/manipulation') diff --git a/src/manipulation/var/rtagName.js b/src/manipulation/var/rtagName.js index d565dd3de..7435620c1 100644 --- a/src/manipulation/var/rtagName.js +++ b/src/manipulation/var/rtagName.js @@ -1,5 +1,8 @@ define( function() { "use strict"; - return ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); + // rtagName captures the name from the first start tag in a string of HTML + // https://html.spec.whatwg.org/multipage/syntax.html#tag-open-state + // https://html.spec.whatwg.org/multipage/syntax.html#tag-name-state + return ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); } ); -- cgit v1.2.3