contents.ftl template parsing a hash causes Service Exception

Description

1 <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" > <ServiceException> freemarker.core.ParseException: Encountered &quot;,&quot; at line 6, column 47 in content.ftl. Was expecting: &quot;&gt;&quot; ... Encountered &quot;,&quot; at line 6, column 47 in content.ftl. Was expecting: &quot;&gt;&quot; ... </ServiceException></ServiceExceptionReport>

This error is received with this content.ftl template:

1 2 3 4 5 6 7 8 9 10 11 12 13 <#list features as feature> <h1>${feature.vessel_name.value}</h1> <h3>Destination Point: ${feature.geom.value}</h3> <h3>Arrive : ${feature.arrive_time.value}</h3> <h4>Point Data : ${feature.point_data.value}</h4> <#list feature.point_data as k, v> <#if v??> <#if v?is_enumerable><#continue></#if> <#if k=="WeatherData"><#continue></#if> ${k}:${v} </#if> </#list> </#list>

This parses and works ok in https://try.freemarker.apache.org/ template tester.

Environment

GeoServer Version
2.13.1
Git Revision
cae7496cb49213c27458c47551fb4797d03825e0
Build Date
20-May-2018 00:44
GeoTools Version
19.1 (rev 5f248795f65bd55eb889f5803163e50479404bdd)
GeoWebCache Version
1.13.1 (rev 1.13.x/e219127b6e89d08f40b0796852db0636bdc322a2)

Status

Assignee

Unassigned

Reporter

Paul Cleverley

Triage

None

Fix versions

None

Affects versions

2.14.1

Priority

High
Configure