diff options
author | Rémy Coutable <remy@rymai.me> | 2016-05-10 12:47:55 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-05-10 12:47:55 +0300 |
commit | 3af78b5c53d5214e662aa35c6adde53d00f6c51e (patch) | |
tree | 67ad862689bea4757b85fe61fbb0baf266b58774 /app | |
parent | f96c34ec456deca5bb93ef27e578f078ece24aa3 (diff) | |
parent | f52a15e022fb451fa9074495897cdd10dbeeceb3 (diff) |
Merge branch 'revert-4026' into 'master'
Revert "Merge branch 'wiki-fix' into 'master'"
This reverts commit 4cc85a58e8ca00f5a4ecbd2bca40a0cad867b817 (!4026), reversing
changes made to 90ae445ba930068d04adc5a009dbdeabe4cb3e34.
From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4026#note_11719950:
> 1. On Ruby 2.1.x, the [`uri.path = ::File.join(project_wiki_base_path, uri.path)`](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/banzai/filter/wiki_link_filter.rb#L39) raises an `URI::InvalidComponentError: bad component(expected relative path component): http://bar.com/baz` error in `Banzai::Filter::WikiLinkFilter#rebuild_wiki_uri`, which is then rescued in [`Banzai::Filter::WikiLinkFilter#process_link_attr`](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/banzai/filter/wiki_link_filter.rb#L34), thus the link is not modified and the tests pass.
1. On Ruby 2.2.x, the same line doesn't raise an error anymore, thus tests are broken on Ruby 2.2 only. I didn't really understand yet why having absolute links in the wiki would break some tests vs having relative links as before, but I think the safest course to action is to revert this MR and to find another fix (probably just prepending `ProjectWiki#wiki_base_path` with the relative URL path component if we are in the case of a relative URL...
/cc @artem-sidorenko
Just a FYI note: no need to pick into `8-7-stable` since the original commit was not picked.
See merge request !4105
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project_wiki.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index c91cb70ae25..7c1a61bb0bf 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -40,7 +40,7 @@ class ProjectWiki end def wiki_base_path - [Gitlab.config.gitlab.url, "/", @project.path_with_namespace, "/wikis"].join('') + ["/", @project.path_with_namespace, "/wikis"].join('') end # Returns the Gollum::Wiki object. |