diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 423f94f..33fd849 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -44,6 +44,8 @@ class WikiController < ApplicationController
helper :watchers
include Redmine::Export::PDF
+ include ActionView::Helpers::SanitizeHelper
+
# List of pages, sorted alphabetically and by parent (hierarchy)
def index
load_pages_for_index
@@ -109,7 +111,7 @@ class WikiController < ApplicationController
send_data(export, :type => 'text/html', :filename => filename_for_content_disposition("#{@page.title}.html"))
return
elsif params[:format] == 'txt'
- send_data(@content.text, :type => 'text/plain', :filename => filename_for_content_disposition("#{@page.title}.txt"))
+ send_data(strip_tags(@content.text), :type => 'text/plain', :filename => filename_for_content_disposition("#{@page.title}.txt"))
return
end
end
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 5ba88a6..5fe4946 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -18,11 +18,14 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module SearchHelper
+ include ActionView::Helpers::SanitizeHelper
+
def highlight_tokens(text, tokens)
return text unless text && tokens && !tokens.empty?
re_tokens = tokens.collect {|t| Regexp.escape(t)}
regexp = Regexp.new "(#{re_tokens.join('|')})", Regexp::IGNORECASE
result = +''
+ text = strip_tags(text)
text.split(regexp).each_with_index do |words, i|
if result.length > 1200
# maximum length of the preview reached
diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb
index 1440e32..3dd7240 100644
--- a/app/views/account/login.html.erb
+++ b/app/views/account/login.html.erb
@@ -1,27 +1,28 @@
<%= call_hook :view_account_login_top %>
+
<%= l(:label_login) %>
<%= form_tag(signin_path, onsubmit: 'return keepAnchorOnSignIn(this);') do %>
<%= back_url_hidden_field_tag %>
-
+
<%= text_field_tag 'username', params[:username], :tabindex => '1' %>
-
+
<%= password_field_tag 'password', nil, :tabindex => '2' %>
-
+
<% if Setting.openid? %>
<%= text_field_tag "openid_url", nil, :tabindex => '3' %>
<% end %>
-
+
<% if Setting.autologin? %>
<% end %>
-
+
<% end %>
diff --git a/app/views/issues/tabs/_changesets.html.erb b/app/views/issues/tabs/_changesets.html.erb
index f869a5d..5a1d012 100644
--- a/app/views/issues/tabs/_changesets.html.erb
+++ b/app/views/issues/tabs/_changesets.html.erb
@@ -16,9 +16,7 @@
:rev => changeset.identifier) %>)
<% end %>
-
+
<%= call_hook(:view_issues_history_changeset_bottom, { :changeset => changeset }) %>
<% end %>
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index 76e23cf..d896e59 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -2,22 +2,27 @@
-
+
<%= html_title %>
-
+
<%= csrf_meta_tag %>
<%= favicon %>
-<%= stylesheet_link_tag 'jquery/jquery-ui-1.11.0', 'tribute-3.7.3', 'application', 'responsive', :media => 'all' %>
+<%= stylesheet_link_tag 'jquery/jquery-ui-1.11.0', 'cookieconsent.min', 'tribute-3.7.3', 'application', 'responsive', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
+
+<% is_welcome = !User.current.logged? && current_page?(:controller => 'welcome', :action => 'index') %>
+<%= stylesheet_link_tag 'frontpage', :media => 'all' if is_welcome %>
+
<%= javascript_heads %>
+
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
-
+
<%= call_hook :view_layouts_base_body_top %>
@@ -60,20 +65,32 @@
+
+
<%=l(:label_sort_higher)%><%= javascript_tag "$('#scrollup').click(function(){$('html,body').animate({scrollTop:0},600);return false;});" %>
<%= l(:label_loading) %>
+
+
+
+
+
+
<%= call_hook :view_layouts_base_body_bottom %>
+
+
+
diff --git a/app/views/repositories/_changeset.html.erb b/app/views/repositories/_changeset.html.erb
index 393e03e..9b18c02 100644
--- a/app/views/repositories/_changeset.html.erb
+++ b/app/views/repositories/_changeset.html.erb
@@ -33,9 +33,7 @@
-
+
<% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %>
<%= render :partial => 'related_issues' %>
diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb
index a710496..1c90103 100644
--- a/app/views/wiki/show.html.erb
+++ b/app/views/wiki/show.html.erb
@@ -61,7 +61,8 @@
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
-