summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-05-15 23:51:55 +0000
committersr55 <[email protected]>2012-05-15 23:51:55 +0000
commitbaa8450d05725312ababacb782d6a6acdc388566 (patch)
tree302955758c48399ac75c6e9370a8979150d01005 /win/CS
parent4a77bc4a9816b28f69dc110ffd624ba9f3173958 (diff)
WinGui: Fix a bunch of dodgy regexs that could lead to certain filenames causeing the query parser to break.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4682 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
index 7dc120d7e..5be0b0c83 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
@@ -46,20 +46,20 @@ namespace HandBrake.ApplicationServices.Utilities
#region Regular Expressions
// Source
- Match title = Regex.Match(input, @"-t ([0-9]*)");
- Match chapters = Regex.Match(input, @"-c ([0-9-]*)");
+ Match title = Regex.Match(input, @"-t ([0-9]+)");
+ Match chapters = Regex.Match(input, @"-c ([0-9-]+)");
// Output Settings
- Match format = Regex.Match(input, @"-f ([a-zA-Z0-9]*)");
+ Match format = Regex.Match(input, @"-f ([a-zA-Z0-9]+)");
Match grayscale = Regex.Match(input, @" -g");
Match largerMp4 = Regex.Match(input, @" -4");
Match ipodAtom = Regex.Match(input, @" -I");
// Picture Settings Tab
- Match width = Regex.Match(input, @"-w ([0-9]*)");
- Match height = Regex.Match(input, @"-l ([0-9]*)");
- Match maxWidth = Regex.Match(input, @"-X ([0-9]*)");
- Match maxHeight = Regex.Match(input, @"-Y ([0-9]*)");
+ Match width = Regex.Match(input, @"-w ([0-9]+)");
+ Match height = Regex.Match(input, @"-l ([0-9]+)");
+ Match maxWidth = Regex.Match(input, @"-X ([0-9]+)");
+ Match maxHeight = Regex.Match(input, @"-Y ([0-9]+)");
Match crop = Regex.Match(input, @"--crop ([0-9]*):([0-9]*):([0-9]*):([0-9]*)");
Match looseAnamorphic = Regex.Match(input, @"--loose-anamorphic");
@@ -81,10 +81,10 @@ namespace HandBrake.ApplicationServices.Utilities
Match detelecineValue = Regex.Match(input, @" --detelecine=\""([a-zA-Z0-9.:]*)\""");
// Video Settings Tab
- Match videoEncoder = Regex.Match(input, @"-e ([a-zA-Z0-9]*)");
- Match videoFramerate = Regex.Match(input, @"-r ([0-9.]*)");
- Match videoBitrate = Regex.Match(input, @"-b ([0-9]*)");
- Match videoQuality = Regex.Match(input, @"-q ([0-9.]*)");
+ Match videoEncoder = Regex.Match(input, @"-e ([a-zA-Z0-9]+)");
+ Match videoFramerate = Regex.Match(input, @"-r ([0-9.]+)");
+ Match videoBitrate = Regex.Match(input, @"-b ([0-9]+)");
+ Match videoQuality = Regex.Match(input, @"-q ([0-9.]+)");
Match twoPass = Regex.Match(input, @" -2");
Match turboFirstPass = Regex.Match(input, @" -T");
Match optimizeMP4 = Regex.Match(input, @" -O");
@@ -94,13 +94,13 @@ namespace HandBrake.ApplicationServices.Utilities
// Audio Settings Tab
Match noAudio = Regex.Match(input, @"-a none");
- Match audioTracks = Regex.Match(input, @"-a ([0-9,]*)");
- Match audioTrackMixes = Regex.Match(input, @"-6 ([0-9a-zA-Z,]*)");
- Match audioEncoders = Regex.Match(input, @"-E ([a-zA-Z0-9+,:\*]*)");
- Match audioBitrates = Regex.Match(input, @"-B ([0-9a-zA-Z,]*)"); // Auto = a-z
- Match audioSampleRates = Regex.Match(input, @"-R ([0-9a-zA-Z.,]*)"); // Auto = a-z
- Match drcValues = Regex.Match(input, @"-D ([0-9.,]*)");
- Match gainValues = Regex.Match(input, @"--gain=([0-9.,-]*)");
+ Match audioTracks = Regex.Match(input, @"-a ([0-9,]+)");
+ Match audioTrackMixes = Regex.Match(input, @"-6 ([0-9a-zA-Z,]+)");
+ Match audioEncoders = Regex.Match(input, @"-E ([a-zA-Z0-9+,:\*]+)");
+ Match audioBitrates = Regex.Match(input, @"-B ([0-9a-zA-Z,]+)"); // Auto = a-z
+ Match audioSampleRates = Regex.Match(input, @"-R ([0-9a-zA-Z.,]+)"); // Auto = a-z
+ Match drcValues = Regex.Match(input, @"-D ([0-9.,]+)");
+ Match gainValues = Regex.Match(input, @"--gain=([0-9.,-]+)");
Match fallbackEncoder = Regex.Match(input, @"--audio-fallback([a-zA-Z0-9:=\s ]*)");
Match allowedPassthru = Regex.Match(input, @"--audio-copy-mask([a-zA-Z0-9:,=\s ]*)");