diff options
| author | Douwe Maan <douwe@gitlab.com> | 2016-01-13 14:21:32 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2016-01-13 14:21:32 +0000 |
| commit | c7d9e7806a2cfb887533e1fab24a8340988272d4 (patch) | |
| tree | 034957f410724ac5c12a17b05694bfd3b2b16f5a /lib | |
| parent | 9664424cab50ea2ac11669dc73c26f029e229fb9 (diff) | |
| parent | 710659fc1fe73e4feffdb3fbb14f4098bb58046c (diff) | |
| download | gitlab-ce-c7d9e7806a2cfb887533e1fab24a8340988272d4.tar.gz | |
Merge branch 'fix/reference_filter_uri_decode_error_for_master' into 'master'
Fix #9963 reference_filter "Encoding::CompatibilityError" bug with some complex URL;
https://github.com/gitlabhq/gitlabhq/pull/9964
@DouweM
See merge request !2383
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/banzai/filter/reference_filter.rb | 4 | ||||
| -rw-r--r-- | lib/gitlab/gitlab_import/importer.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/banzai/filter/reference_filter.rb b/lib/banzai/filter/reference_filter.rb index 7198a8b03e2..5dd6d2fe3c7 100644 --- a/lib/banzai/filter/reference_filter.rb +++ b/lib/banzai/filter/reference_filter.rb @@ -133,7 +133,7 @@ module Banzai next unless link && text - link = URI.decode(link) + link = CGI.unescape(link) # Ignore ending punctionation like periods or commas next unless link == text && text =~ /\A#{pattern}/ @@ -170,7 +170,7 @@ module Banzai text = node.text next unless link && text - link = URI.decode(link) + link = CGI.unescape(link) next unless link && link =~ /\A#{pattern}\z/ html = yield link, text diff --git a/lib/gitlab/gitlab_import/importer.rb b/lib/gitlab/gitlab_import/importer.rb index e24b94d6159..59926084d07 100644 --- a/lib/gitlab/gitlab_import/importer.rb +++ b/lib/gitlab/gitlab_import/importer.rb @@ -12,7 +12,7 @@ module Gitlab end def execute - project_identifier = URI.encode(project.import_source, '/') + project_identifier = CGI.escape(project.import_source, '/') #Issues && Comments issues = client.issues(project_identifier) |
