Open
Bug 550567
Opened 15 years ago
Updated 15 years ago
xfeDoCommand wrong parses command line
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: iav, Unassigned)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1.8) Gecko/20100205 SeaMonkey/2.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1.8) Gecko/20100205 SeaMonkey/2.0.3
xfeDoCommand wrong parses command line.
example:
string
seamonkey -remote "xfeDoCommand(composeMessage,subject='Any-any subject text',attachment='file:///c:/Temp/tempfile.html')"
As result new mail composition window should be opened, with pre-filled subject "Any-any subject text", and attached file from file:///c:/Temp/tempfile.html
In the real world no new mail window opens.
When I remove all spaces prom string after "composeMessage", it start work ok.
Then, parser
if (/^\s*(\w+)\s*\(\s*([^\s,]+)\s*,?\s*([^\s]*)\s*\)\s*$/.test(remote)) {
at http://mxr.mozilla.org/comm-central/source/suite/browser/nsBrowserContentHandler.js#288 wrongly parse remaining parameters, stopping on first whitespace (thanks :mcsmurf!).
I think regexp there should be
^\s*(\w+)\s*\(\s*([^\s,]+)\s*,?\s*(.*)\s*\)\s*$
where ([^\s]*) replaced by (.*) for any parameters.
Reproducible: Always
Reporter | ||
Updated•15 years ago
|
OS: Windows XP → All
Hardware: x86 → All
Comment 1•15 years ago
|
||
See bug 499785 for a similar problem.
Reporter | ||
Comment 2•15 years ago
|
||
Yes, very similar.
But think my regexp more correct - just not touch this part of strind, just pass to the handler.
Comment 3•15 years ago
|
||
(In reply to comment #0)
> I think regexp there should be
> ^\s*(\w+)\s*\(\s*([^\s,]+)\s*,?\s*(.*)\s*\)\s*$
This isn't quite right, because it will include spaces after the parameter.
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in
before you can comment on or make changes to this bug.
Description
•