BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
378ee1da
Commit
378ee1da
authored
Aug 30, 2017
by
Jacopo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unescape HTML characters in Wiki title
The special characters of a wiki title are now escaped correctly.
parent
f35d7d7f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
wiki_page.rb
app/models/wiki_page.rb
+1
-1
35686-unescape-wiki-title.yml
changelogs/unreleased/35686-unescape-wiki-title.yml
+5
-0
wiki_page_spec.rb
spec/models/wiki_page_spec.rb
+6
-0
No files found.
app/models/wiki_page.rb
View file @
378ee1da
...
...
@@ -84,7 +84,7 @@ class WikiPage
# The formatted title of this page.
def
title
if
@attributes
[
:title
]
self
.
class
.
unhyphenize
(
@attributes
[
:title
]
)
CGI
.
unescape_html
(
self
.
class
.
unhyphenize
(
@attributes
[
:title
])
)
else
""
end
...
...
changelogs/unreleased/35686-unescape-wiki-title.yml
0 → 100644
View file @
378ee1da
---
title
:
Unescape HTML characters in Wiki title
merge_request
:
13942
author
:
Jacopo Beschi @jacopo-beschi
type
:
fixed
spec/models/wiki_page_spec.rb
View file @
378ee1da
...
...
@@ -281,6 +281,12 @@ describe WikiPage do
@page
.
title
=
"Import-existing-repositories-into-GitLab"
expect
(
@page
.
title
).
to
eq
(
"Import existing repositories into GitLab"
)
end
it
'unescapes html'
do
@page
.
title
=
'foo & bar'
expect
(
@page
.
title
).
to
eq
(
'foo & bar'
)
end
end
describe
'#directory'
do
...
...
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