Closed
Bug 4928
Opened 26 years ago
Closed 23 years ago
escaping causes blank lines
Categories
(Bugzilla :: Bugzilla-General, defect, P1)
Bugzilla
Bugzilla-General
Tracking
()
VERIFIED
FIXED
Bugzilla old
People
(Reporter: ian, Assigned: terry)
References
()
Details
This is a child of bug #3474.
Bugzilla's login form after submitting info on a bug when you're not logged
in contains all the stuff that you've submitted within the form, as hidden
values, for example like this:
<input type=hidden name=assigned_to value="kmcclusk@netscape.com">
<input type=hidden name=component value="Form Submission">
<input type=hidden name=comment value="This is being submitted with NN 4.5
before logging into bugzilla. There are two blank lines here:
And this is a line.
And this is a line.
(I expect this to work.)">
<input type=hidden name=form_name value="process_bug">
<input type=hidden name=resolution value="FIXED">
<input type=hidden name=dup_id value="">
According to HTML4, the carriage returns in the "value" attribute for the
"comment" field should be collapsed to spaces.
Thus correctly working browsers (including Mozilla) collapse the spaces, and
the comment field should lose the hard returns.
Possible solutions to this problem include:
1. %-encode the comment field's value attribute, as is done for URIs.
2. Escape line breaks.
3. Use a TEXTAREA instead of an INPUT element, with the attribute:
style="display:none"
Solution 1 is by far the best method. You should be able to lever some code
from other parts of the codebase to implement it. Solution 2 may be easier
if there is no code to use. Solution 3 is not backwards compatible.
Reporter | ||
Updated•26 years ago
|
Summary: value attribute of login form hidden fields contains line breaks
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•26 years ago
|
||
Solution 2 seems pretty wonderful to me -- I don't know what you dislike about
it -- and I have implemented it.
The problem with solution 1 is that the browser does not URI-decode value fields
for me. So I would have to know for any given field whether it was URI-encoded
or not, and do the decoding myself. This is bug-prone.
Fixed.
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → REOPENED
Summary: value attribute of login form hidden fields contains line breaks → escaping causes blank lines
Reporter | ||
Comment 2•26 years ago
|
||
The current system causes blank lines to appear in comment fields (eg, on this
page, when viewed in IE4). This is because some blank lines are escaped as

 instead of just 
. This appears to occur on all line breaks
but the first one.
Note, though, that the CRLF issue is a complex one. For example, the SGML and
HTML specs disagree.
To be on the safest side, you should ensure that all #13#10 and #10#13 pairs
and every lone #10 are escaped as simply 
. (The SGML spec says that all #10
characters should be ignored.)
Assignee | ||
Updated•26 years ago
|
Resolution: FIXED → ---
Assignee | ||
Comment 3•26 years ago
|
||
Apparently, bug 5183 has some samples of problems that I believe are caused by
this.
Assignee | ||
Comment 4•26 years ago
|
||
Reassigning to dmose@mozilla.org, who now has front-line responsibility for
all Bonsai and Bugzilla bugs.
Reporter | ||
Updated•26 years ago
|
Priority: P3 → P1
Reporter | ||
Comment 5•26 years ago
|
||
Increasing priority as this is affecting every bug in bugzilla and is making
it difficult to read bugs.
Assignee | ||
Updated•26 years ago
|
Assignee: dmose → terry
Assignee | ||
Comment 6•26 years ago
|
||
I thought I fixed this for once and for all this morning. Are you saying that
you still get the double-spacing effect?
Reporter | ||
Comment 7•26 years ago
|
||
No, I don't anymore. Shouldn't it be marked fixed, then?
(And is this the cause of the weird diff posts I just e-mailed you about?)
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•26 years ago
|
||
I didn't mark it fixed entirely because I thought you were saying it wasn't.
And yes, this was causing weird diff stuff, until I fixed that.
Marking FIXED now.
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 9•26 years ago
|
||
Both the spacing and the diff problems seem to be fixed. Marking verified.
Updated•26 years ago
|
Status: VERIFIED → REOPENED
Updated•26 years ago
|
Resolution: FIXED → ---
Comment 10•26 years ago
|
||
I don't think this is fixed.
See bug 2742. (And no, I don't mean the content. Just my submission using Mozilla on 1999-05-10.)
Reopening bug.
Comment 11•26 years ago
|
||
The same thing happened above. I viewed source and you don't seem to be using the hidden fields anymore. Are you using cookies or something?
Comment 12•26 years ago
|
||
Actually, the above didn't work even without the login form. So is this a
bugzilla problem or a Mozilla problem?
Updated•26 years ago
|
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
Comment 13•26 years ago
|
||
I seem to have to use hard returns to get the textarea to submit returns.
I've run into that before but I thought it was fixed. Re-resolving bug. However, I'll use this bug to test bugzilla again on my next build.
Comment 14•26 years ago
|
||
Sorry. The Mozilla problem is bug 2442.
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 15•26 years ago
|
||
No bugzilla problems with the escaping AFAICT.
Comment 16•23 years ago
|
||
Moving to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
QA Contact: matty
Target Milestone: --- → Bugzilla old
Version: other → unspecified
Comment 17•23 years ago
|
||
This apparently breaks the parameters page in Opera 6.0 on Linux. The
newlines in the forms go away when the form page is created, and this
b0rks all the email params when you save any parameter changes. I guess
it's an Opera HTML problem but I am not sure.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 18•23 years ago
|
||
I no longer own Bugzilla.
Assignee: terry → justdave
Status: REOPENED → NEW
Comment 20•23 years ago
|
||
see previous comment. re-marking fixed.
Status: NEW → RESOLVED
Closed: 26 years ago → 23 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•