Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
log
Commits
0dc86dd8
Commit
0dc86dd8
authored
Dec 20, 2014
by
Michael Stenta
Browse files
Don't over-sanitize. Fixes issues with character escapes in auto-generated log titles.
parent
f1837b0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
log.module
View file @
0dc86dd8
...
...
@@ -518,7 +518,7 @@ function log_name_generate($log) {
// If Token is installed, run replacements.
if
(
module_exists
(
'token'
))
{
$name
=
token_replace
(
$pattern
,
array
(
'log'
=>
$log
),
array
(
'clear'
=>
TRUE
));
$name
=
token_replace
(
$pattern
,
array
(
'log'
=>
$log
),
array
(
'clear'
=>
TRUE
,
'sanitize'
=>
FALSE
));
}
// If Token is not available, at least replace the default [log:id].
...
...
@@ -529,9 +529,6 @@ function log_name_generate($log) {
// Strip extraneous spaces (explode on spaces, remove empty items, implode with spaces).
$name
=
implode
(
' '
,
array_filter
(
explode
(
' '
,
$name
)));
// Sanitize it!
$name
=
check_plain
(
$name
);
// If the name is empty, set it to a sensible default.
if
(
empty
(
$name
))
{
$name
=
'Log '
.
$log
->
id
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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