EncodeUrl failure for testing
This commit is contained in:
parent
5d598a99c5
commit
0da0e43aa5
3 changed files with 9 additions and 5 deletions
|
@ -41,10 +41,14 @@ public class EncodeUrl implements ValueRenderer {
|
|||
*/
|
||||
@Override
|
||||
public String render(Template template, String valueId, String differentiator) {
|
||||
String value;
|
||||
if (template.hasValueId(differentiator)) {
|
||||
return StringUtils.encodeUrl(template.getValue(differentiator));
|
||||
value = template.getValue(differentiator);
|
||||
} else if (template.hasAttribute(differentiator)) {
|
||||
value = template.getAttribute(differentiator).toString();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
return StringUtils.encodeUrl(value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue