mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
A live page wrote its Jobtype item as "Fuldtid </ li >". node-html-parser consumes well-formed markup but does not recognise a closing tag with a space after the "<" or the slash, so the fragment became a text node and overviewValue kept it: employmentType: ["Fuldtid </ li >"], matching none of the documented job-type vocabulary. The same cleanText feeds every text field on both branches. Strip only the closing-tag shape in cleanText before collapsing whitespace. The parser decodes entities before cleanText runs, so author text the page encoded as <div> or <T> arrives as a literal <div> / <T> and must stay; a probe of what the parser leaks shows only malformed closing shapes (</ li >, </ li>, < /li>). Two fixtures: the stray tag in both the Jobtype item and a description paragraph (fails on master), and an entity-encoded <div> that survives. Observed by the maintainer in the #516 merge note.