Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC
Commits: 6e168808 by Marvin Scholz at 2021-10-11T11:56:35+00:00 macosx: fixup user-provided URIs Fixup user-provided URIs, similar to what most browser nowadays do. Fix #21661 (cherry picked from commit cc6a5a7370467e7f0fb51578f06f68dfe19dca3b) Signed-off-by: Marvin Scholz <[email protected]> - - - - - 1 changed file: - modules/gui/macosx/VLCOpenWindowController.m Changes: ===================================== modules/gui/macosx/VLCOpenWindowController.m ===================================== @@ -1040,9 +1040,20 @@ static NSString *kCaptureTabViewId = @"capture"; [mrlString stringByAppendingFormat: @":%i", iPort]; } } - } else + } else { mrlString = [_netHTTPURLTextField stringValue]; + // Fixup the user-provided URI + const char *orig_uri = [mrlString UTF8String]; + if (orig_uri == NULL) + return; + char *fixed_uri = vlc_uri_fixup(orig_uri); + if (fixed_uri) { + mrlString = [[NSString alloc] initWithUTF8String:fixed_uri]; + free(fixed_uri); + } + } + [self setMRL: mrlString]; } View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6e16880810fcdbfd5d2ab89226f0b76c4a4fbf22 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6e16880810fcdbfd5d2ab89226f0b76c4a4fbf22 You're receiving this email because of your account on code.videolan.org.
_______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
