If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Shortcut with spaces in web application name doesn't work

RESOLVED FIXED

Status

Mozilla Labs
Prism
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Tuomas Kiviaho, Assigned: mfinkle)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007102311 webrunner/0.7

Web application name becomes as part of the id but in shortcut it isn't escaped correctly. Thus when it contains spaces the shortcut doesn't work

Reproducible: Always

Steps to Reproduce:
1.Launch prism
2.Enter web application name that contains spaces and save it as shortcut
3.Use the shortcut
Actual Results:  
Prism web application dialog

Expected Results:  
Prism browsing the entered URL

Comment 1

10 years ago
I can confirm this. A solution is to modify the properties of the shortcut to put quotes around the string after the -webapp argument.

For example:

  -webapp "app with spaces@prism.app"

Comment 2

10 years ago
I should note that I'm using Prism 0.8 with file version "1.8.20060.60814" according to the file properties.

Comment 3

10 years ago
Confirming both the bug and the workaround.  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007102311 webrunner/0.7

Shane: there's a little gear near the bottom right corner of the Prism window. If you click it, a menu that includes "About Prism" will drop down.  This will display the user agent string.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 4

10 years ago
Aha. I hadn't noticed that icon. "About Prism" reports the same string for me.

Comment 5

10 years ago
This happens to me also.

Deleting the space in the filename, without changing any other part of the file fixes the issue.

Prism can't open files with spaces.
(Assignee)

Updated

10 years ago
Duplicate of this bug: 401367
Component: Prism → Prism
Product: Other Applications → Mozilla Labs
(Assignee)

Updated

10 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

10 years ago
Assignee: nobody → mark.finkle
Status: ASSIGNED → NEW

Comment 7

10 years ago
Created attachment 286469 [details] [diff] [review]
Fixing Bug 401201 by replacing /\s/ in generated id with "_"

This bug can be solved by replacing every space character in generated id with a non-space character such as "_".

You can also finish it with adding some quotation marks in generated link target. But I don't think this solution is as good as the first one.
(Assignee)

Comment 8

10 years ago
Comment on attachment 286469 [details] [diff] [review]
Fixing Bug 401201 by replacing /\s/ in generated id with "_"



The "name" is converted to lowercase and used as the "id" of the webapp. Replacing spaces with "_" (or "." in my case) will work, but we have more to worry about.

The "id" is used to make a folder in the Prism profile, so the "id" must end up being a valid (cross-platfom) folder name too. So we have some more regex work to do:

* convert spaces (including runs of spaces) to a single "."
* remove "/", "\", "?", ":" - and any other illegal Windows, Linux and Mac folder name characters
Attachment #286469 - Flags: review-
(Assignee)

Comment 9

10 years ago
(In reply to comment #7)
> Created an attachment (id=286469) [details]
> Fix Bug 401201 by replacing /\s/ in generated id with "_"

This is a good start, but we need more checks

Updated

10 years ago
Attachment #286469 - Attachment description: Fix Bug 401201 by replacing /\s/ in generated id with "_" → Fixing Bug 401201 by replacing /\s/ in generated id with "_"

Comment 10

10 years ago
> * convert spaces (including runs of spaces) to a single "."

Converting spaces to "." may cause Prism create a "hidden" folder after in UNIX, if the "name" starts with space. This character has special meanings too often.

> * remove "/", "\", "?", ":" - and any other illegal Windows, Linux and Mac
> folder name characters

Will there be too many collisions, if we just remove unwanted characters? Maybe we should "escape" them.

Maybe we should also care legal characters with special meaning, such as "@".
Created attachment 286589 [details] [diff] [review]
add defensive checks to shortcut dialog

This patch checks for empty name, invalid characters in name, and no shortcuts selected. It also converts spaces in name to "." in the generated webapp id
Attachment #286469 - Attachment is obsolete: true
applied to trunk
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Assignee)

Updated

10 years ago
Duplicate of this bug: 401692
(Assignee)

Updated

10 years ago
Duplicate of this bug: 401757
(Assignee)

Updated

10 years ago
Duplicate of this bug: 401760
Duplicate of this bug: 401805
You need to log in before you can comment on or make changes to this bug.