Skip to content
Snippets Groups Projects
Commit 40cb4804 authored by pabois's avatar pabois
Browse files

correct url pattern

parent 94d54b07
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,8 @@ module Communication::Website::Page::WithPath
def url
return unless published
return if website.url.blank?
Static.clean_path "#{website.url}#{path}"
# do not use a global Static.clean here because url has protocol with 2 slashes!
"#{website.url.end_with?('/') ? website.url[0..-2] : website.url}#{Static.clean_path path}"
end
protected
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment