From a070963dff617898d23dcaa4a8f77d9c7355c093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Tue, 29 Jul 2014 22:22:27 -0700 Subject: [PATCH] Use "text/template" instead of "html/" to not have HTML-escaping Otherwise, characters like quotes, less/greater than signs, and ampersand would get HTML-escaped in the text editor for the pull request message. --- commands/pull_request_tpl.go | 2 +- features/pull_request.feature | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/pull_request_tpl.go b/commands/pull_request_tpl.go index a55b9d9f..87d1951e 100644 --- a/commands/pull_request_tpl.go +++ b/commands/pull_request_tpl.go @@ -3,7 +3,7 @@ package commands import ( "bytes" "fmt" - "html/template" + "text/template" "regexp" "strings" ) diff --git a/features/pull_request.feature b/features/pull_request.feature index ec4deb85..61a2f077 100644 --- a/features/pull_request.feature +++ b/features/pull_request.feature @@ -77,14 +77,14 @@ Feature: hub pull-request """ post('/repos/mislav/coral/pulls') { halt 400 if request.content_charset != 'utf-8' - assert :title => 'This is somewhat of a longish title that does not get wrapped and references #1234', + assert :title => 'This is somewhat of a longish title that does not get wrapped & references #1234', :body => nil json :html_url => "the://url" } """ Given I am on the "master" branch pushed to "origin/master" When I successfully run `git checkout --quiet -b topic` - Given I make a commit with message "This is somewhat of a longish title that does not get wrapped and references #1234" + Given I make a commit with message "This is somewhat of a longish title that does not get wrapped & references #1234" And the "topic" branch is pushed to "origin/topic" When I successfully run `hub pull-request` Then the output should contain exactly "the://url\n" -- GitLab