Fossil SCM

Have /attachlist treat attachment comments as plain text, not fossil wiki, for consistency with /ainfo and fileformat.wiki. Add TODOs to adjust both of those to account for the attachment comment mimetype, but we currently have no UI for setting the comment's mimetype.

stephan 2026-06-05 08:39 UTC attach-v2
Commit da17e05356abed701cdd26234d5d0888ef6634e11bc029311c7ad56942f8eff7
1 file changed +6 -1
+6 -1
--- src/attach.c
+++ src/attach.c
@@ -354,11 +354,15 @@
354354
@ </s>
355355
}
356356
@ <br>
357357
if( zComment ) while( fossil_isspace(zComment[0]) ) zComment++;
358358
if( zComment && zComment[0] ){
359
- @ %!W(zComment)<br>
359
+ /* FIXME (2026-06-05): Honor the N-card (comment mimetype). %W
360
+ ** (historically used here) assumes fossil-wiki and the
361
+ ** fileformat.wiki doc has always claimed that it defaults to
362
+ ** text/plain. /ainfo assumes it is plain text. */
363
+ @ %h(zComment)<br>
360364
}
361365
if( zForumPost==0 && zPage==0 && zTkt==0 && zTechNote==0 ){
362366
if( bDeleted ){
363367
zSrc = "Deleted from";
364368
}else {
@@ -1268,10 +1272,11 @@
12681272
@ <tr><th>Filename:</th><td>%h(zName)</td></tr>
12691273
if( g.perm.Setup ){
12701274
@ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr>
12711275
}
12721276
@ <tr><th valign="top">Description:</th>\
1277
+ /* FIXME (2026-06-05): Honor the N-card (comment mimetype). */
12731278
@ <td valign="top">%h(zDesc)</td></tr>
12741279
@ </table>
12751280
12761281
if( modPending && (isModerator || bUserIsOwner) ){
12771282
@ <div class="section">Moderation</div>
12781283
--- src/attach.c
+++ src/attach.c
@@ -354,11 +354,15 @@
354 @ </s>
355 }
356 @ <br>
357 if( zComment ) while( fossil_isspace(zComment[0]) ) zComment++;
358 if( zComment && zComment[0] ){
359 @ %!W(zComment)<br>
 
 
 
 
360 }
361 if( zForumPost==0 && zPage==0 && zTkt==0 && zTechNote==0 ){
362 if( bDeleted ){
363 zSrc = "Deleted from";
364 }else {
@@ -1268,10 +1272,11 @@
1268 @ <tr><th>Filename:</th><td>%h(zName)</td></tr>
1269 if( g.perm.Setup ){
1270 @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr>
1271 }
1272 @ <tr><th valign="top">Description:</th>\
 
1273 @ <td valign="top">%h(zDesc)</td></tr>
1274 @ </table>
1275
1276 if( modPending && (isModerator || bUserIsOwner) ){
1277 @ <div class="section">Moderation</div>
1278
--- src/attach.c
+++ src/attach.c
@@ -354,11 +354,15 @@
354 @ </s>
355 }
356 @ <br>
357 if( zComment ) while( fossil_isspace(zComment[0]) ) zComment++;
358 if( zComment && zComment[0] ){
359 /* FIXME (2026-06-05): Honor the N-card (comment mimetype). %W
360 ** (historically used here) assumes fossil-wiki and the
361 ** fileformat.wiki doc has always claimed that it defaults to
362 ** text/plain. /ainfo assumes it is plain text. */
363 @ %h(zComment)<br>
364 }
365 if( zForumPost==0 && zPage==0 && zTkt==0 && zTechNote==0 ){
366 if( bDeleted ){
367 zSrc = "Deleted from";
368 }else {
@@ -1268,10 +1272,11 @@
1272 @ <tr><th>Filename:</th><td>%h(zName)</td></tr>
1273 if( g.perm.Setup ){
1274 @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr>
1275 }
1276 @ <tr><th valign="top">Description:</th>\
1277 /* FIXME (2026-06-05): Honor the N-card (comment mimetype). */
1278 @ <td valign="top">%h(zDesc)</td></tr>
1279 @ </table>
1280
1281 if( modPending && (isModerator || bUserIsOwner) ){
1282 @ <div class="section">Moderation</div>
1283

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button