/*
- * Sone - ImageLinkFilter.java - Copyright © 2011–2013 David Roden
+ * Sone - ImageLinkFilter.java - Copyright © 2011–2015 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
int maxWidth = parseInt(valueOf(parameters.get("max-width")), MAX_VALUE);
int maxHeight = parseInt(valueOf(parameters.get("max-height")), MAX_VALUE);
String mode = valueOf(parameters.get("mode"));
- String title = valueOf(parameters.get("title"));
+ String title = Optional.fromNullable(parameters.get("title")).transform(getStringValue()).orNull();
TemplateContext linkTemplateContext = templateContextFactory.createTemplateContext();
linkTemplateContext.set("class", imageClass);