escape brackets

Change-Id: I4ea697b48007f83b913b2359aa2d63e584757442
Reviewed-on: http://review.couchbase.org/37685
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>