[Android] Sanitize streams URL before playing it

Nicolas Pomepuy git at videolan.org
Thu Apr 9 09:16:12 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Apr  1 07:50:49 2020 +0200| [519d4386d4393ea6cc0f41c12f18e15631d3f2a8] | committer: Geoffrey Métais

Sanitize streams URL before playing it

> https://code.videolan.org/videolan/vlc-android/commit/519d4386d4393ea6cc0f41c12f18e15631d3f2a8
---

 .../vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
index 77ba74c76..fdf838360 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
@@ -146,7 +146,7 @@ class MRLPanelFragment : Fragment(), View.OnKeyListener, TextView.OnEditorAction
 
     private fun processUri(): Boolean {
         if (!TextUtils.isEmpty(viewModel.observableSearchText.get())) {
-            val mw = MLServiceLocator.getAbstractMediaWrapper(Uri.parse(viewModel.observableSearchText.get()))
+            val mw = MLServiceLocator.getAbstractMediaWrapper(Uri.parse(viewModel.observableSearchText.get()?.trim()))
             playMedia(mw)
             viewModel.observableSearchText.set("")
             return true



More information about the Android mailing list