CUPS on RHEL unable to disable sanitize_title #2603

michaelrsweet opened this Issue Nov 16, 2007 · 2 comments


None yet
1 participant

michaelrsweet commented Nov 16, 2007

Version: 1.1-current User: ericb

The syntax for our print job looks like:

lp -d PQ123 -t IDENTIFIER=JOBID123 /tmp/test.lp

JOBID123 identifies the queue on the IBM mainframe, and the "=" is required.

RHEL 4 (and RHEL 3) Cups backend lpd is stripping off the "=" from the job title before sending the data, replacing the "=" with "_". This is preventing us from using these print queues.

As lp currently works, sanitize_title is initialized to true. If -o sanitize_title is passed in the command, it executes the assignment:
sanitize_title = !value[0] || !strcasecmp(value, "on") ||
!strcasecmp(value, "yes") || !strcasecmp(value, "true");

This only serves to test if the user passed -o sanitize_title in the affirmative, then it will set sanitize_title to true. There is not a way to set it to false. One way to address this solution might be to follow this assigment with its boolean opposite, for example:


  else if (!strcasecmp(name, "sanitize_title"))
    * Set sanitize title...

    sanitize_title = !value[0] || !strcasecmp(value, "on") ||
     !strcasecmp(value, "yes") || !strcasecmp(value, "true");

    sanitize_title = !value[0] || !strcasecmp(value, "off") ||
     !strcasecmp(value, "no")   || !strcasecmp(value, "false");

michaelrsweet commented Nov 17, 2007 User: ericb

sorry. got that a little wrong. probably something more like -

if !value[0] {
sanitize_title = !strcasecmp(value, "off") ||
!strcasecmp(value, "no") ||
!strcasecmp(value, "false");


michaelrsweet commented Nov 17, 2007 User: mike

The sanitize_title option is a device URI option, not a job option. You need to use:

lpadmin -p printer -v "lpd://foo/bar?sanitize_title=no"

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment