The default bug view has changed. See this FAQ.

submission action="mailto.." not working

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
11 years ago
8 months ago

People

(Reporter: Steve Speicher, Assigned: Merle Sterling)

Tracking

({fixed1.8.0.5, fixed1.8.1})

Trunk
x86
Windows XP
fixed1.8.0.5, fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

1.19 KB, application/xhtml+xml
Details
1005 bytes, patch
Doron Rosenberg (IBM)
: review+
Allan Beaufour
: review+
Details | Diff | Splinter Review
(Reporter)

Description

11 years ago
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
(Reporter)

Comment 1

11 years ago
Created attachment 216557 [details]
test case

Comment 2

11 years ago
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

Updated

11 years ago
Blocks: 322255

Comment 3

11 years ago
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.

Updated

11 years ago
Assignee: aaronr → msterlin
(Assignee)

Comment 4

11 years ago
Created attachment 218324 [details] [diff] [review]
Correct parameters for NS_EscapeURL

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)
(Assignee)

Updated

11 years ago
Status: NEW → ASSIGNED

Comment 5

11 years ago
Comment on attachment 218324 [details] [diff] [review]
Correct parameters for NS_EscapeURL

Stupid me (http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsEscape.h#140)
Attachment #218324 - Flags: review+
(Assignee)

Updated

11 years ago
Attachment #218324 - Flags: review?(allan)

Comment 6

11 years ago
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)

Updated

11 years ago
Attachment #218324 - Flags: review?(allan) → review+

Comment 7

11 years ago
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch

Updated

11 years ago
Keywords: fixed1.8.1

Updated

11 years ago
Keywords: fixed1.8.0.5

Updated

11 years ago
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.