Problem rendering "example" URL in markdown following update to 11.7.4
Current install: GitLab Community Edition 11.7.4
Following a recent update to 11.7.4, one of our wiki pages failed to render, with the following error shown at the top of the page:
On further investigation, it was in regard to an example link included on the page:
http://[Server]:[WC_defaulthost port for client server]/[client-name]/xxx/index.jsp
On the page in question, it was not in a code block, the code block was added to resolve the problem. If you remove the code block, it will fail.
After a little testing, it looks like the inclusion of a space is causing some confusion as the following allows the page to render:
http://[Server]:[WC_defaulthost]/[client-name]/xxx/index.jsp
but the following does not (hence the code block):
http://[Server]:[WC_defaulthost ]/[client-name]/xxx/index.jsp
Looking at the output from gitlab-ctl tail
, the following error was output:
ActionView::Template::Error (Invalid port number: "[WC_defaulthost"):
27:
28: .prepend-top-default.append-bottom-default
29: .wiki.md{ class: ('use-csslab' if Feature.enabled?(:csslab)) }
30: = render_wiki_content(@page, legacy_render_context(params))
31:
32: = render 'sidebar'
lib/banzai/filter/autolink_filter.rb:117:in `autolink_match'
lib/banzai/filter/autolink_filter.rb:127:in `block in autolink_filter'
lib/gitlab/string_range_marker.rb:39:in `block in mark'
lib/gitlab/string_range_marker.rb:35:in `each'
lib/gitlab/string_range_marker.rb:35:in `each_with_index'
lib/gitlab/string_range_marker.rb:35:in `mark'
lib/gitlab/string_regex_marker.rb:15:in `mark'
lib/banzai/filter/autolink_filter.rb:126:in `autolink_filter'
lib/banzai/filter/autolink_filter.rb:63:in `block in call'
lib/banzai/filter/autolink_filter.rb:58:in `call'
lib/banzai/pipeline/base_pipeline.rb:23:in `block (2 levels) in singleton class'
lib/banzai/renderer.rb:110:in `render_result'
lib/banzai/renderer.rb:141:in `block in cacheless_render'
lib/gitlab/metrics/influx_db.rb:100:in `measure'
lib/banzai/renderer.rb:140:in `cacheless_render'
lib/banzai/renderer.rb:30:in `render'
lib/banzai.rb:12:in `render'
app/helpers/markup_helper.rb:269:in `markdown_unsafe'
app/helpers/markup_helper.rb:140:in `render_wiki_content'
app/views/projects/wikis/show.html.haml:30:in `_app_views_projects_wikis_show_html_haml__4519798600894046242_70151764415560'
app/controllers/application_controller.rb:113:in `render'
app/controllers/projects/wikis_controller.rb:29:in `show'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:417:in `set_locale'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/correlation_id.rb:15:in `use_id'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:40:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:20:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
lib/gitlab/middleware/release_env.rb:13:in `call'
FYI: I have tested this by creating a new ticket here (gitlab.com) and it also failed.