Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
add0bf4d
Commit
add0bf4d
authored
Nov 27, 2011
by
Felix Schäfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't double-escape project names in base layout.
parent
8c26dea7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
application_helper.rb
app/helpers/application_helper.rb
+1
-1
base.rhtml
app/views/layouts/base.rhtml
+1
-1
layout_test.rb
test/integration/layout_test.rb
+11
-0
No files found.
app/helpers/application_helper.rb
View file @
add0bf4d
...
...
@@ -413,7 +413,7 @@ module ApplicationHelper
title
=
[]
title
<<
h
(
@project
.
name
)
if
@project
title
+=
@html_title
if
@html_title
title
<<
Setting
.
app_title
title
<<
h
(
Setting
.
app_title
)
title
.
select
{
|
t
|
!
t
.
blank?
}.
join
(
' - '
)
else
@html_title
||=
[]
...
...
app/views/layouts/base.rhtml
View file @
add0bf4d
...
...
@@ -2,7 +2,7 @@
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xml:lang=
"en"
>
<head>
<meta
http-equiv=
"content-type"
content=
"text/html; charset=utf-8"
/>
<title>
<%=
h
html_title
%>
</title>
<title>
<%=
html_title
%>
</title>
<meta
name=
"description"
content=
"
<%=
Redmine
::
Info
.
app_name
%>
"
/>
<meta
name=
"keywords"
content=
"issue,bug,tracker"
/>
<%=
csrf_meta_tag
%>
...
...
test/integration/layout_test.rb
View file @
add0bf4d
...
...
@@ -60,4 +60,15 @@ class LayoutTest < ActionController::IntegrationTest
:attributes
=>
{
:src
=>
%r{^/javascripts/jstoolbar/textile.js}
},
:parent
=>
{
:tag
=>
'head'
}
end
test
"page titles should be properly escaped"
do
project
=
Project
.
generate
(
:name
=>
"C&A"
)
with_settings
:app_title
=>
'<3'
do
get
"/projects/
#{
project
.
to_param
}
"
assert_select
"title"
,
/C&A/
assert_select
"title"
,
/<3/
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment