Last Comment Bug 332009 - submission action="mailto.." not working
: submission action="mailto.." not working
: fixed1.8.0.5, fixed1.8.1
Product: Core
Classification: Components
Component: XForms (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: Merle Sterling
: Stephen Pride
Depends on:
Blocks: 322255
  Show dependency treegraph
Reported: 2006-03-28 10:49 PST by Steve Speicher
Modified: 2006-06-06 07:01 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

test case (1.19 KB, application/xhtml+xml)
2006-03-28 10:55 PST, Steve Speicher
no flags Details
Correct parameters for NS_EscapeURL (1005 bytes, patch)
2006-04-13 12:20 PDT, Merle Sterling
doronr: review+
allan: review+
Details | Diff | Review

Description Steve Speicher 2006-03-28 10:49:35 PST
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
Comment 1 Steve Speicher 2006-03-28 10:55:11 PST
Created attachment 216557 [details]
test case
Comment 2 aaronr 2006-03-28 12:48:05 PST
I think that Doron said that this works on Linux but sure doesn't work on Windows.  Not even the nightly, so not a regression.
Comment 3 Doron Rosenberg (IBM) 2006-03-28 13:36:19 PST
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.
Comment 4 Merle Sterling 2006-04-13 12:20:09 PDT
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.
Comment 5 Doron Rosenberg (IBM) 2006-04-14 09:52:29 PDT
Comment on attachment 218324 [details] [diff] [review]
Correct parameters for NS_EscapeURL

Stupid me (
Comment 6 aaronr 2006-04-14 14:41:03 PDT
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.
Comment 7 Allan Beaufour 2006-04-20 03:25:46 PDT
Fixed on trunk.

Note You need to log in before you can comment on or make changes to this bug.