Fossil SCM
Set id attribute on <select> element generated by TH1 combobox command to NAME so it can be referenced by a <label> element.
Commit
73fdb8a73d784f55a9e19d4f44c6d99e20d447c3
Parent
b2a53207376618c…
1 file changed
+3
-2
+3
-2
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -430,12 +430,13 @@ | ||
| 430 | 430 | |
| 431 | 431 | if( Th_ToInt(interp, argv[3], argl[3], &height) ) return TH_ERROR; |
| 432 | 432 | Th_SplitList(interp, argv[2], argl[2], &azElem, &aszElem, &nElem); |
| 433 | 433 | blob_init(&name, (char*)argv[1], argl[1]); |
| 434 | 434 | zValue = Th_Fetch(blob_str(&name), &nValue); |
| 435 | - z = mprintf("<select name=\"%z\" size=\"%d\">", | |
| 436 | - htmlize(blob_buffer(&name), blob_size(&name)), height); | |
| 435 | + zH = htmlize(blob_buffer(&name), blob_size(&name)); | |
| 436 | + z = mprintf("<select id=\"%s\" name=\"%s\" size=\"%d\">", zH, zH, height); | |
| 437 | + free(zH); | |
| 437 | 438 | sendText(z, -1, 0); |
| 438 | 439 | free(z); |
| 439 | 440 | blob_reset(&name); |
| 440 | 441 | for(i=0; i<nElem; i++){ |
| 441 | 442 | zH = htmlize((char*)azElem[i], aszElem[i]); |
| 442 | 443 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -430,12 +430,13 @@ | |
| 430 | |
| 431 | if( Th_ToInt(interp, argv[3], argl[3], &height) ) return TH_ERROR; |
| 432 | Th_SplitList(interp, argv[2], argl[2], &azElem, &aszElem, &nElem); |
| 433 | blob_init(&name, (char*)argv[1], argl[1]); |
| 434 | zValue = Th_Fetch(blob_str(&name), &nValue); |
| 435 | z = mprintf("<select name=\"%z\" size=\"%d\">", |
| 436 | htmlize(blob_buffer(&name), blob_size(&name)), height); |
| 437 | sendText(z, -1, 0); |
| 438 | free(z); |
| 439 | blob_reset(&name); |
| 440 | for(i=0; i<nElem; i++){ |
| 441 | zH = htmlize((char*)azElem[i], aszElem[i]); |
| 442 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -430,12 +430,13 @@ | |
| 430 | |
| 431 | if( Th_ToInt(interp, argv[3], argl[3], &height) ) return TH_ERROR; |
| 432 | Th_SplitList(interp, argv[2], argl[2], &azElem, &aszElem, &nElem); |
| 433 | blob_init(&name, (char*)argv[1], argl[1]); |
| 434 | zValue = Th_Fetch(blob_str(&name), &nValue); |
| 435 | zH = htmlize(blob_buffer(&name), blob_size(&name)); |
| 436 | z = mprintf("<select id=\"%s\" name=\"%s\" size=\"%d\">", zH, zH, height); |
| 437 | free(zH); |
| 438 | sendText(z, -1, 0); |
| 439 | free(z); |
| 440 | blob_reset(&name); |
| 441 | for(i=0; i<nElem; i++){ |
| 442 | zH = htmlize((char*)azElem[i], aszElem[i]); |
| 443 |