From a7209a70b6a909c57b5c495df3b98f3ab9d4a303 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 21 Aug 2026 20:16:12 +0000 Subject: [PATCH] test: cover the meta-tag variants the suite never saw, and fix title/textarea Reviewing what the tests actually reach turned up one live defect and a suite that mostly did not run. The defect is the comment bug again, in the elements whose content is text rather than markup. `5 < 6, that's math` is ordinary HTML: the `<` opened a phantom tag, the apostrophe opened a phantom attribute value, and every tag after it -- the whole og: block -- was swallowed. Same for ` + | + | + """.trimMargin() + + val metaTags = MetaTagsParser.parse(input).toList() + + assertEquals(1, metaTags.size) + assertEquals("Real Title", metaTags[0].attr("content")) + } + + @Test + fun aSelfClosedScriptStillOpensRawText() { + // Deliberate, and what a browser does: `/` on a script start tag is ignored, so everything + // up to `` is script data. A page written this way shows nothing after it either. + // Pinned so that "fixing" it never turns a JS string into an og: tag. + val input = + """ + | + |