Bug 126044 - Newlines in the Comments text are not escaped.
Summary: Newlines in the Comments text are not escaped.
Status: CLOSED WORKSFORME
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: kdeprintfax (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-21 20:48 UTC by Ray Lischner
Modified: 2008-12-31 19:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Lischner 2006-04-21 20:48:06 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    SuSE RPMs
OS:                Linux

The Comments edit box lets the user type multiple lines of text. Indeed, because word wrap is disabled, it encourages the user to enter hard newline characters. Unfortunately, those newline characters are passed to the fax program, which can't cope.

HylaFax is the only fax program that actually does anything with comments, and if your comments include a hard newline, sendfax reports the following error:

500 'JPARM COMMENTS "testing.': Syntax error, unmatched quote mark

You can see how other programs might copy, too. For example, use "echo <%comment>" as a custom fax program. If the Comments contain a hard newline, the following error results:

Sending to fax using: echo <'testing.
more testing'> 
/bin/sh: -c: line 1: syntax error near unexpected token `newline'
/bin/sh: -c: line 1: `more testing'>  '

A workaround for HylaFax is to use \n instead of newline. That makes the text hard to read and hard to edit, but at least, you can get a hard newline in the fax comments.
Comment 1 Michael Goffioul 2006-04-24 08:50:16 UTC
Isn't the same as bug #126085?
Comment 2 Ray Lischner 2006-04-24 15:55:29 UTC
Sorry about that. I have a list of kdeprintfax issues, and I forgot which ones I had already entered.
Comment 3 Cristian Tibirna 2006-04-27 05:16:48 UTC
IMO the right solution would be to accept whatever the user puts in the widget 
(be it rigged with newlines or not) and then take the raw text and strip 
offensive characters and eventually word-wrap according to page size etc.
Comment 4 John Layt 2008-12-31 19:58:30 UTC
Closing old Resolved status bug.