Bug 1899300 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Steps to reproduce:
1. Open https://en.savefrom.net/
2. Input https://youtube.com/watch?v=eMn_77h2_Kk
3. Continue from browser
4. Click download button

Actual results:

Filename concatenated to remove everything before and including the last '/' as shown in attachment.

Expected results:

Filename changed to replace the unsafe character '/' with '_' (and other unsafe characters) and nothing else changes

More info in [Bug 1815613](https://bugzilla.mozilla.org/show_bug.cgi?id=1815613)
Steps to reproduce (from Bug 1815613):
1. Open https://en.savefrom.net/
2. Input https://youtube.com/watch?v=eMn_77h2_Kk
3. Continue from browser
4. Click download button

Actual results:

Filename concatenated to remove everything before and including the last '/' as shown in attachment.

Expected results:

Filename changed to replace the unsafe character '/' with '_' (and other unsafe characters) and nothing else changes

More info in [Bug 1815613](https://bugzilla.mozilla.org/show_bug.cgi?id=1815613)
Steps to reproduce (from Bug 1815613):
1. Open https://en.savefrom.net/
2. Input https://youtube.com/watch?v=eMn_77h2_Kk
3. Continue from browser
4. Click download button

Actual results:

Filename concatenated to remove everything before and including the last '/' as shown in attachment.

Expected results:

Filename changed to replace the unsafe character '/' with '_' (and other unsafe characters) and nothing else changes

More info in [Bug 1815613](https://bugzilla.mozilla.org/show_bug.cgi?id=1815613)

After making the necessary changes over in [String.kt](https://searchfox.org/mozilla-central/source/mobile/android/android-components/components/support/ktx/src/main/java/mozilla/components/support/ktx/kotlin/String.kt#303) and or [DownloadUtils.kt](https://searchfox.org/mozilla-central/source/mobile/android/android-components/components/support/utils/src/main/java/mozilla/components/support/utils/DownloadUtils.kt#255), consider adding '/' to the escaped characters in [String.replaceEscapedCharacters](https://searchfox.org/mozilla-central/source/mobile/android/android-components/components/support/ktx/src/main/java/mozilla/components/support/ktx/kotlin/String.kt#317). If this addition to `String.replaceEscapedCharacters` is done, don't forget also to add a test over in [StringTest.kt](https://searchfox.org/mozilla-central/source/mobile/android/android-components/components/support/ktx/src/test/java/mozilla/components/support/ktx/kotlin/StringTest.kt#229)

Back to Bug 1899300 Comment 0