Fixed bug on tag having dot #27972
This commit is contained in:
parent
12853353d4
commit
980fbbb5ec
|
@ -80,7 +80,7 @@ public abstract class Record extends CKANPackage {
|
|||
|
||||
public static final String TYPE_QUERY_FILTER_KEY = "extras_systemtype";
|
||||
|
||||
public static final Pattern TAG_PATTERN = Pattern.compile("[^\\s\\w-_]");
|
||||
public static final Pattern TAG_PATTERN = Pattern.compile("[^\\s\\w-_.]");
|
||||
|
||||
protected UriInfo uriInfo;
|
||||
|
||||
|
@ -147,6 +147,7 @@ public abstract class Record extends CKANPackage {
|
|||
String t = tag.get(Record.NAME_PROPERTY).asText();
|
||||
Matcher tagMatcher = Record.TAG_PATTERN.matcher(t);
|
||||
String newT = tagMatcher.replaceAll("");
|
||||
newT = newT.replaceAll(" ", " ");
|
||||
((ObjectNode)tag).replace(Record.NAME_PROPERTY, new TextNode(newT));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,8 +90,8 @@
|
|||
</#if>
|
||||
<#if include>
|
||||
<#local list = .data_model[timeseries] >
|
||||
<#assign valueSep = "" >
|
||||
<#list list[0..*5] as ts>
|
||||
<#assign valueSep = "" >
|
||||
{
|
||||
"key": "<#if namespace?has_content>${namespace}:</#if>${key}",
|
||||
"value": "${ts.value?json_string} [<#if ts.unit?has_content>Unit: ${ts.unit?json_string}<#assign valueSep = " - " ></#if><#if ts.reporting_year_or_assessment_id?has_content>${valueSep}Rep. Year or Assessment ID: ${ts.reporting_year_or_assessment_id?json_string}<#assign valueSep = " - " ></#if><#if ts.reference_year?has_content>${valueSep}Ref. Year: ${ts.reference_year?replace(',','')}<#assign valueSep = " - " ></#if><#if ts.data_owner?has_content>${valueSep}Data Owner: ${ts.data_owner?json_string}<#assign valueSep = " - " ></#if><#if ts.db_source?has_content>${valueSep}DB Source: ${ts.db_source?json_string}</#if>]"
|
||||
|
|
Loading…
Reference in New Issue