99e615846246a19fdb5d01fcea5dce49179dd2ba braney Tue Sep 22 10:52:28 2026 -0700 htmlPage: parse valueless tag attributes such as SELECTED The attribute name scanner read everything up to the next equals sign, so <OPTION SELECTED value='any'> became a single attribute named "SELECTED value". A lookup for SELECTED then found nothing and the SELECT fell back to its first option. The same happened to CHECKED on a checkbox, and to the src in <script async src=...>. A name now ends at white space as well, with a look-ahead so that spaces around the equals sign still work. This is what put 21 soft errors in every hgNearTest robot run since v495. refs #38413 diff --git src/lib/tests/makefile src/lib/tests/makefile index 6af34921040..7e4ca00f65a 100644 --- src/lib/tests/makefile +++ src/lib/tests/makefile @@ -82,30 +82,32 @@ diff expected/errCatch.bad output/errCatch.bad htmlExpandUrlTest: htmlExpandUrlTest.o ${MYLIBS} mkdirs @${MKDIR} $(dir $@) ${CC} ${COPT} -o ${BIN_DIR}/htmlExpandUrlTest htmlExpandUrlTest.o ${MYLIBS} ${L} ${STRIP} ${BIN_DIR}/htmlExpandUrlTest${EXE} ${BIN_DIR}/htmlExpandUrlTest > output/htmlExpandUrlTest 2>&1 diff expected/htmlExpandUrlTest output/htmlExpandUrlTest htmlPageTest: htmlPageTest.o ${MYLIBS} mkdirs @${MKDIR} $(dir $@) ${CC} ${COPT} -o ${BIN_DIR}/htmlPageTest htmlPageTest.o ${MYLIBS} ${L} ${STRIP} ${BIN_DIR}/htmlPageTest${EXE} ${BIN_DIR}/htmlPageTest input/google.html > output/google.out diff expected/google.out output/google.out + ${BIN_DIR}/htmlPageTest input/valuelessAttrs.html > output/valuelessAttrs.out + diff expected/valuelessAttrs.out output/valuelessAttrs.out pipelineTests: pipelineWrite pipelineWriteMult pipelineWriteFd \ pipelineRead pipelineReadMult pipelineReadFd pipelineReadMem \ pipelineExitCode pipelineExitCode2X pipelineWriteErr pipelineExecError pipelineSigpipe \ pipelineTimeout pipelineWrite: ${pipelineTester} mkdirs ${pipelineTester} -write -pipeData=input/simple1.txt -otherEnd=output/$@.out.gz "gzip -1" gunzip -c output/$@.out.gz > output/$@.out diff -b input/simple1.txt output/$@.out # add come junk to make sure output gets truncated pipelineWriteMult: ${pipelineTester} mkdirs cat input/google.html > output/$@.wc ${pipelineTester} -write -pipeData=input/simple1.txt -otherEnd=output/$@.wc "gzip -1" "gzip -dc" "wc"