{"record":{"id":"74b936cf0ea09045","repo":"jdx/mise","slug":"consider-enabling-keep-danger-placeholders-optio","errorCode":null,"errorMessage":"Consider enabling 'keep_danger_placeholders' option (to silence this error, if parser wasn't failed with current HTML-code) or manually replace few random bytes, to free up the codes.","messagePattern":"Consider enabling 'keep_danger_placeholders' option \\(to silence this error, if parser wasn't failed with current HTML-code\\) or manually replace few random bytes, to free up the codes\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/vfox/lua/htmlparser.lua","lineNumber":89,"sourceCode":"\t\t\t\telse -- if < or >\n\t\t\t\t\tdbg(\"[FindPH]:#LINE# Done!\",i)\n\t\t\t\t\tbreak\n\t\t\t\tend -- if < or > -- }}}\n\t\t\telse -- text!match(cc)\n\t\t\t\tdbg(\"[FindPH]:#LINE# Text contains this byte! || i=%d\",i)\n\t\t\tend -- text!match(cc) -- }}}\n\t\t\tlocal skip=1\n\t\t\tif i==31 then\n\t\t\t\tskip=96 -- ASCII\n\t\t\tend\n\t\t\ti=i+skip\n\t\tuntil (i==255) -- }}}\n\t\ti=nil\n\t\t--- }}}\n\n\t\tif not(tpr[\"<\"]) or not(tpr[\">\"]) then\n\t\t\terr(\"Impossible to find at least two unused byte codes in this HTML-code. We need it to escape bracket-contained placeholders inside tags.\")\n\t\t\terr(\"Consider enabling 'keep_danger_placeholders' option (to silence this error, if parser wasn't failed with current HTML-code) or manually replace few random bytes, to free up the codes.\")\n\t\telse\n\t\t\tdbg(\"[FindPH]:#LINE# Found! || '<'=%d, '>'=%d\",tpr[\"<\"]:byte(),tpr[\">\"]:byte())\n\t\tend\n\n--\tdbg(\"tpr[>] || tpr[] || #busy%d\")\n\n\t\t-- g {{{\n\t\tlocal function g(id,...)\n\t\t\tlocal arg={...}\n\t\t\tlocal orig=arg[id]\n\t\t\targ[id]=arg[id]:gsub(\"(.)\",tpr)\n\t\t\tif arg[id] ~= orig then\n\t\t\t\ttpl=true\n\t\t\t\tdbg(\"[g]:#LINE# orig: %s\", str(orig))\n\t\t\t\tdbg(\"[g]:#LINE# replaced: %s\",str(arg[id]))\n\t\t\tend\n\t\t\tdbg(\"[g]:#LINE# called, id: %s, arg[id]: %s, args { \"..((\"{%s}, \"):rep(#arg):gsub(\", $\",\"\"))..\" }\",id,arg[id],...)\n\t\t\tdbg(\"[g]:#LINE# concat(arg): %s\",table.concat(arg))","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/crates/vfox/lua/htmlparser.lua#L71-L107","documentation":"The follow-up remediation message emitted alongside error 1616 by htmlparser.lua's FindPH routine. It tells the user the two ways out of the missing-byte-codes situation: turn on 'keep_danger_placeholders' (which suppresses the fatal error when parsing would still succeed) or free up byte codes by replacing a few bytes in the HTML.","triggerScenarios":"Always emitted immediately after \"Impossible to find at least two unused byte codes...\" when `tpr[\"<\"]` or `tpr[\">\"]` is nil after the 0–255 scan.","commonSituations":"Same as 1616: vfox plugin parsing HTML whose byte distribution leaves no free placeholder codes; users see the pair of errors together.","solutions":["Set the 'keep_danger_placeholders' option to convert this into a non-fatal condition.","Replace a few random/unusual bytes in the HTML to free up byte codes.","Pre-normalize the input (strip control/exotic bytes) before invoking the parser."],"exampleFix":"// before\n-- default options: fatal when no free byte codes\nhtmlparser.parse(html)\n// after\n-- enable the option to silence the error\nhtmlparser.parse(html, { keep_danger_placeholders = true })","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set 'keep_danger_placeholders' when parsing arbitrary HTML.","Pre-clean input bytes so placeholder codes are available.","Pair this message with error 1616 — same root cause and fixes."],"tags":["lua","vfox","htmlparser","workaround"],"backgroundTag":"internal-invariant-violation","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}