Commit 0dc86dd8 authored by m.stenta's avatar m.stenta
Browse files

Don't over-sanitize. Fixes issues with character escapes in auto-generated log titles.

parent f1837b0d
...@@ -518,7 +518,7 @@ function log_name_generate($log) { ...@@ -518,7 +518,7 @@ function log_name_generate($log) {
// If Token is installed, run replacements. // If Token is installed, run replacements.
if (module_exists('token')) { 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]. // If Token is not available, at least replace the default [log:id].
...@@ -529,9 +529,6 @@ function log_name_generate($log) { ...@@ -529,9 +529,6 @@ function log_name_generate($log) {
// Strip extraneous spaces (explode on spaces, remove empty items, implode with spaces). // Strip extraneous spaces (explode on spaces, remove empty items, implode with spaces).
$name = implode(' ', array_filter(explode(' ', $name))); $name = implode(' ', array_filter(explode(' ', $name)));
// Sanitize it!
$name = check_plain($name);
// If the name is empty, set it to a sensible default. // If the name is empty, set it to a sensible default.
if (empty($name)) { if (empty($name)) {
$name = 'Log ' . $log->id; $name = 'Log ' . $log->id;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment