Closed Bug 564050 Opened 15 years ago Closed 15 years ago

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

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: mfinkle)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file 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).
Attached patch patchSplinter Review
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+
Status: NEW → RESOLVED
Closed: 15 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+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: