• R/O
  • SSH
  • HTTPS

amb: Commit


Commit MetaInfo

Revision214 (tree)
Time2022-02-12 00:36:40
Authormateuszviste

Log Message

percents in source html files are double-encoded in the AMB output

Change Summary

Incremental Difference

--- samples/fdhelp2amb/html2ama.c (revision 213)
+++ samples/fdhelp2amb/html2ama.c (revision 214)
@@ -372,9 +372,10 @@
372372 printf("\xA3"); /* 'ú' in CP850 */
373373 } else if (strcmp(buff, "Uacute") == 0) {
374374 printf("\xE9"); /* 'Ú' in CP850 */
375+ } else if (strcmp(buff, "percnt") == 0) {
376+ printf("%%%%");
375377 } else if (strcmp(buff, "tilde") == 0) {
376378 printf("~");
377-
378379 } else if (strcmp(buff, "iexcl") == 0) {
379380 printf("\xAD"); /* inverted '!' in CP850 */
380381 } else if (strcmp(buff, "iquest") == 0) {
@@ -467,8 +468,10 @@
467468 /* else dump the text as-is */
468469 printf("%c", c);
469470
471+ /* add an extra '%' to escape percent chars */
472+ if (c == '%') printf("%%");
473+
470474 }
471-
472475 }
473476
474477
Show on old repository browser