Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cgi-bin/admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,10 @@ do_list_printers(http_t *http) /* I - HTTP connection */
else if (*ptr == '?' || *ptr == '(')
break;

// Remove the underscore if it is the last and not the only character
if (option_ptr > (option + 1) && option_ptr[-1] == '_')
option_ptr--;

*option_ptr = '\0';

cgiSetArray("TEMPLATE_NAME", i, option);
Expand Down