Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name 'View Customize plugin'
author 'onozaty'
description 'View Customize plugin for Redmine'
version '2.3.0'
version '2.3.0.40-2'
url 'https://github.com/onozaty/redmine-view-customize'
author_url 'https://github.com/onozaty'

Expand Down
8 changes: 5 additions & 3 deletions lib/view_customize/view_hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module RedmineViewCustomize
class ViewHook < Redmine::Hook::ViewListener
def view_layouts_base_html_head(context={})

path = context[:request].path_info;
path = Redmine::CodesetUtil.replace_invalid_utf8(context[:request].path_info);

html = "\n<!-- [view customize plugin] path:#{path} -->\n"
html << stylesheet_link_tag("view_customize", plugin: "view_customize")
Expand All @@ -17,7 +17,8 @@ def view_layouts_base_html_head(context={})

def view_issues_form_details_bottom(context={})

return create_view_customize_html(context[:request].path_info, ViewCustomize::INSERTION_POSITION_ISSUE_FORM)
path = Redmine::CodesetUtil.replace_invalid_utf8(context[:request].path_info);
return create_view_customize_html(path, ViewCustomize::INSERTION_POSITION_ISSUE_FORM)
end

def view_issues_show_details_bottom(context={})
Expand All @@ -26,7 +27,8 @@ def view_issues_show_details_bottom(context={})
html << "ViewCustomize.context.issue = { id: #{context[:issue].id} };"
html << "\n//]]>\n</script>"

html << create_view_customize_html(context[:request].path_info, ViewCustomize::INSERTION_POSITION_ISSUE_SHOW)
path = Redmine::CodesetUtil.replace_invalid_utf8(context[:request].path_info);
html << create_view_customize_html(path, ViewCustomize::INSERTION_POSITION_ISSUE_SHOW)

return html
end
Expand Down