/*
- * Sone - CssClassNameFilter.java - Copyright © 2010 David Roden
+ * Sone - CssClassNameFilter.java - Copyright © 2010–2020 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Converts the {@link String} {@link String#valueOf(Object) representation} of
* an object to a valid CSS class name by converting all characters that are not
* US-ASCII letters or numbers to an underscore.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
public class CssClassNameFilter implements Filter {
* {@inheritDoc}
*/
@Override
- public Object format(TemplateContext templateContext, Object data, Map<String, String> parameters) {
+ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters) {
return String.valueOf(data).replaceAll("[^a-zA-Z0-9-]", "_");
}