diff --git a/SourceGitweb/SourceGitweb.php b/SourceGitweb/SourceGitweb.php index 68c28ff..58ee754 100644 --- a/SourceGitweb/SourceGitweb.php +++ b/SourceGitweb/SourceGitweb.php @@ -117,6 +117,9 @@ } public function commit( $p_repo, $p_data ) { + # Handle branch names with '+' character + $p_data = str_replace('_plus_', '+', $p_data); + # The -d option from curl requires you to encode your own data. # Once it reaches here it is decoded. Hence we split by a space # were as the curl command uses a '+' character instead. diff --git a/SourceGitweb/post-receive.tmpl b/SourceGitweb/post-receive.tmpl index f1ce6ee..03a1add 100644 --- a/SourceGitweb/post-receive.tmpl +++ b/SourceGitweb/post-receive.tmpl @@ -4,6 +4,10 @@ # Licensed under the MIT license read LINE + +# Handle branch names with '+' character +LINE=`echo $LINE | sed -e 's/+/_plus_/g'` + LINE=`echo $LINE | sed -e 's/ /+/g'` URL="http://localhost/mantisbt/plugin.php?page=Source/checkin"