Closed Bug 332009 Opened 18 years ago Closed 18 years ago

submission action="mailto.." not working

Categories

(Core Graveyard :: XForms, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspeiche, Assigned: msterlin)

References

()

Details

(Keywords: fixed1.8.0.5, fixed1.8.1)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060328 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060328 Firefox/1.6a1

Whenever the submission action is mailto, no action is invoked (does nothing). This was working, see bug 301571

This fails test cases: 11.2.m/p/q/r

Reproducible: Always
Attached file test case
I think that Doron said that this works on Linux but sure doesn't work on Windows.  Not even the 1.8.0.2 nightly, so not a regression.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 322255
The problem on windows seems to be NS_EscapeURL barfing on a character (seems to be a newline one).

I think the code probably needs to be redone anyways, it is rather hacky.
Assignee: aaronr → msterlin
The main problem was that the order of the parameters in the call to NS_EscapeURL was incorrect and the length of the url to encode was being treated as the flags and vice-versa. The encoded URL becomes way larger than the 2K limit.

Note also that with esc_AlwaysCopy as the only flag, every single character will be url encoded and the size of the message increases by a factor of 3. That would limit the size of messages we could mail to about 660 chars or so.  Added esc_Query to escape the xml body after ?body=. 

The spurious newline is properly encoded as %0A and does not cause a problem.
Attachment #218324 - Flags: review?(aaronr)
Status: NEW → ASSIGNED
Attachment #218324 - Flags: review?(allan)
Comment on attachment 218324 [details] [diff] [review]
Correct parameters for NS_EscapeURL

doron did the official review for me since he did this code originally.  Looks good to me, too.
Attachment #218324 - Flags: review?(aaronr)
Attachment #218324 - Flags: review?(allan) → review+
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Keywords: fixed1.8.1
Keywords: fixed1.8.0.5
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: