Commit 9507ec22 authored by jvandyk's avatar jvandyk
Browse files

#617620 by serenecloud: run check_plain() only once

parent bb3e8f0d
......@@ -179,7 +179,7 @@ function workflow_tab_page($nid) {
}
else {
// Regular state.
$state_name = $states[$history->sid];
$state_name = check_plain(t($states[$history->sid]));
}
if (isset($deleted_states[$history->old_sid])) {
......@@ -187,7 +187,7 @@ function workflow_tab_page($nid) {
$footer_needed = TRUE;
}
else {
$old_state_name = $states[$history->old_sid];
$old_state_name = check_plain(t($states[$history->old_sid]));
}
$rows[] = theme('workflow_history_table_row', $history, $old_state_name, $state_name);
}
......@@ -198,12 +198,15 @@ function workflow_tab_page($nid) {
/*
* Theme one workflow history table row.
*
* $old_state_name and $state_name must be run through check_plain(t())
* before calling this function.
*/
function theme_workflow_history_table_row($history, $old_state_name, $state_name) {
return array(
format_date($history->stamp),
check_plain(t($old_state_name)),
check_plain(t($state_name)),
$old_state_name,
$state_name,
theme('username', $history),
filter_xss($history->comment, array('a', 'em', 'strong')),
);
......
Supports Markdown
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