Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
advanced_help
Commits
7f3d4cfb
Commit
7f3d4cfb
authored
Jan 31, 2016
by
gisle
Browse files
Issue
#2659746
by gisle: Do not choke on invalid multibyte sequences
parent
9451186f
Changes
1
Hide whitespace changes
Inline
Side-by-side
advanced_help.module
View file @
7f3d4cfb
...
...
@@ -640,7 +640,11 @@ function advanced_help_view_topic($module, $topic, $popup = FALSE) {
$info
=
advanced_help_get_topic
(
$module
,
$topic
);
$file
=
"./
$file_info[path]/$file_info[file]
"
;
// Fix invalid byte sequences (Issue #1330056).
$output
=
file_get_contents
(
$file
);
mb_substitute_character
(
0xfffd
);
$output
=
mb_convert_encoding
(
$output
,
'UTF-8'
,
'UTF-8'
);
if
(
isset
(
$info
[
'readme file'
])
&&
$info
[
'readme file'
])
{
$ext
=
pathinfo
(
$file
,
PATHINFO_EXTENSION
);
if
(
'md'
==
$ext
&&
module_exists
(
'markdown'
))
{
...
...
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