[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Ensure setMRL trims whitespace of MRL
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed May 17 10:52:56 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
e6a0d6df by Claudio Cambra at 2023-05-17T10:01:38+00:00
macosx: Ensure setMRL trims whitespace of MRL
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
92f41f77 by Claudio Cambra at 2023-05-17T10:01:38+00:00
macosx: Ensure whitespaces are trimmed in http field before converting to UTF8
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/windows/VLCOpenWindowController.m
Changes:
=====================================
modules/gui/macosx/windows/VLCOpenWindowController.m
=====================================
@@ -344,7 +344,8 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
if (!newMRL)
newMRL = @"";
- _MRL = newMRL;
+ NSString * const trimmedMRL = [newMRL stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
+ _MRL = trimmedMRL;
dispatch_async(dispatch_get_main_queue(), ^{
[self.mrlTextField setStringValue:self.MRL];
@@ -1011,7 +1012,7 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
}
}
} else {
- mrlString = [_netHTTPURLTextField stringValue];
+ mrlString = [_netHTTPURLTextField.stringValue stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
// Fixup the user-provided URI
const char *orig_uri = [mrlString UTF8String];
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/00e4996d1e0707a3a451a2faeb7b868328e03a2d...92f41f77ce9158fe95e7d6ae247554e0e8f93a3e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/00e4996d1e0707a3a451a2faeb7b868328e03a2d...92f41f77ce9158fe95e7d6ae247554e0e8f93a3e
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list