From eb1d3fadbc47c73bedefdf30d293f22cef0af059 Mon Sep 17 00:00:00 2001 From: Woo Date: Thu, 20 Dec 2018 10:52:07 +0800 Subject: [PATCH] Add format property to list columns (#3990) Credit to @vicrly. Fixes #3967. --- modules/backend/widgets/Lists.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index fd7c5caf4..d859a37d9 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -1117,6 +1117,10 @@ class Lists extends WidgetBase $value = implode(', ', $value); } + if (is_string($column->format) && !empty($column->format)) { + $value = sprintf($column->format, $value); + } + return htmlentities($value, ENT_QUOTES, 'UTF-8', false); }