Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a10ab94b
Commit
a10ab94b
authored
Jan 13, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gracefully handle invalid UTF-8 sequences in Markdown links
Closes #6077
parent
f8f96994
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
CHANGELOG
CHANGELOG
+1
-0
lib/banzai/filter/reference_filter.rb
lib/banzai/filter/reference_filter.rb
+2
-0
No files found.
CHANGELOG
View file @
a10ab94b
...
@@ -13,6 +13,7 @@ v 8.4.0 (unreleased)
...
@@ -13,6 +13,7 @@ v 8.4.0 (unreleased)
- Autocomplete data is now always loaded, instead of when focusing a comment text area
- Autocomplete data is now always loaded, instead of when focusing a comment text area
- Improved performance of finding issues for an entire group
- Improved performance of finding issues for an entire group
- Added custom application performance measuring system powered by InfluxDB
- Added custom application performance measuring system powered by InfluxDB
- Gracefully handle invalid UTF-8 sequences in Markdown links (Stan Hu)
- Bump fog to 1.36.0 (Stan Hu)
- Bump fog to 1.36.0 (Stan Hu)
- Add user's last used IP addresses to admin page (Stan Hu)
- Add user's last used IP addresses to admin page (Stan Hu)
- Add housekeeping function to project settings page
- Add housekeeping function to project settings page
...
...
lib/banzai/filter/reference_filter.rb
View file @
a10ab94b
...
@@ -133,6 +133,7 @@ module Banzai
...
@@ -133,6 +133,7 @@ module Banzai
next
unless
link
&&
text
next
unless
link
&&
text
link
=
CGI
.
unescape
(
link
)
link
=
CGI
.
unescape
(
link
)
next
unless
link
.
force_encoding
(
'UTF-8'
).
valid_encoding?
# Ignore ending punctionation like periods or commas
# Ignore ending punctionation like periods or commas
next
unless
link
==
text
&&
text
=~
/\A
#{
pattern
}
/
next
unless
link
==
text
&&
text
=~
/\A
#{
pattern
}
/
...
@@ -170,6 +171,7 @@ module Banzai
...
@@ -170,6 +171,7 @@ module Banzai
next
unless
link
&&
text
next
unless
link
&&
text
link
=
CGI
.
unescape
(
link
)
link
=
CGI
.
unescape
(
link
)
next
unless
link
.
force_encoding
(
'UTF-8'
).
valid_encoding?
next
unless
link
&&
link
=~
/\A
#{
pattern
}
\z/
next
unless
link
&&
link
=~
/\A
#{
pattern
}
\z/
html
=
yield
link
,
text
html
=
yield
link
,
text
...
...
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