"Save as PDF" should not fill in wrong titles for the Maemo file picker

VERIFIED FIXED

Status

Fennec Graveyard
General
VERIFIED FIXED
8 years ago
8 years ago

People

(Reporter: Martijn Wargers (dead), Assigned: mfinkle)

Tracking

({testcase})

Trunk
x86
Windows 7
testcase
Bug Flags:
in-litmus +

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
Created attachment 443740 [details]
testcase

See testcase, when you do the "Save as PDF" thing on that page, the page title gets filled in, but it contains the ':' character, which doesn't seem to be accepted by the Maemo filesystem.
So I think Fennec shouldn't be adding those characters in the file picker to begin with (it should filter those characters out).
Created attachment 443928 [details] [diff] [review]
patch

This patch uses contentAreaUtils::getDefaultFileName to clean and validate the filename. It also adds some maemo-specific cleaning to handle the ":" character.
Assignee: nobody → mark.finkle
Attachment #443928 - Flags: review?(21)
(In reply to comment #1)
> Created an attachment (id=443928) [details]
> patch
> 
> This patch uses contentAreaUtils::getDefaultFileName to clean and validate the
> filename. It also adds some maemo-specific cleaning to handle the ":"
> character.

Maybe we should clean up some others characters?
http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words
(In reply to comment #2)
> (In reply to comment #1)
> > Created an attachment (id=443928) [details] [details]
> > patch
> > 
> > This patch uses contentAreaUtils::getDefaultFileName to clean and validate the
> > filename. It also adds some maemo-specific cleaning to handle the ":"
> > character.
> 
> Maybe we should clean up some others characters?
> http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words

Reading at the list, not much more, maybe the "/"?
(In reply to comment #3)

> Reading at the list, not much more, maybe the "/"?

Already handled by validateFileName, called from getDefaultFileName
Comment on attachment 443928 [details] [diff] [review]
patch

Well, this is perfect.
Attachment #443928 - Flags: review?(21) → review+
pushed m-b:
http://hg.mozilla.org/mobile-browser/rev/26ab8381232b

pushed m-1.1:
http://hg.mozilla.org/releases/mobile-1.1/rev/0be52d1fed51
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
verified FIXED on builds:

Mozilla/5.0 (X11; U; Linux armv7l; Nokia N900; en-US; rv:1.9.2.5pre) Gecko/20100507 Namoroka/3.6.5pre Fennec/1.1b2pre

and

Mozilla/5.0 (X11; U; Linux armv71; Nokia N900; en-US; rv:1.9.3a5pre) Gecko/20100507 Namoroka/3.7a5pre Fennec/2.0a1pre
Status: RESOLVED → VERIFIED
Flags: in-litmus?
litmus testcase https://litmus.mozilla.org/show_test.cgi?id=11800 created to regression test this bug.
Flags: in-litmus? → in-litmus+
Duplicate of this bug: 564035
You need to log in before you can comment on or make changes to this bug.