File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
extensions/shared/library/src/main/java/app/revanced/extension/shared/privacy Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,15 @@ public String sanitizeUrlString(String url) {
3535
3636 public Uri sanitizeUri (Uri uri ) {
3737 try {
38+ String scheme = uri .getScheme ();
39+ if (scheme == null || !(scheme .equals ("http" ) || scheme .equals ("https" ))) {
40+ // Opening YouTube share sheet 'other' option passes the video title as a URI.
41+ // Checking !uri.isHierarchical() works for all cases, except if the
42+ // video title starts with / and then it's hierarchical but still an invalid URI.
43+ Logger .printDebug (() -> "Ignoring uri: " + uri );
44+ return uri ;
45+ }
46+
3847 Uri .Builder builder = uri .buildUpon ().clearQuery ();
3948
4049 if (!parametersToRemove .isEmpty ()) {
You can’t perform that action at this time.
0 commit comments