diff --git a/src/sphinx.js b/src/sphinx.js index c333a66..e8a0be8 100644 --- a/src/sphinx.js +++ b/src/sphinx.js @@ -151,8 +151,12 @@ export function searchIndex(index, query) { // Titles in the index arrive as the HTML of the page's
spans), so they are flattened
-// to text before they are placed on the results page.
-const plainTitle = (t) => String(t).replace(/<[^>]*>/g, '');
+// to text before they are placed on the results page. The '>' is optional so
+// a tag the title never closes is dropped too, not left standing as '