Skip to content

Commit

Permalink
HTML encode title in container-box for expanded string values with HT…
Browse files Browse the repository at this point in the history
…ML reserved chars
  • Loading branch information
jonesde committed Dec 3, 2019
1 parent f6726f5 commit e5400ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion template/screen-macro/DefaultScreenMacros.html.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ ${sri.renderSection(.node["@name"])}
<#if !boxType?has_content><#assign boxType = "default"></#if>
<div class="panel panel-${boxType}"<#if contBoxDivId?has_content> id="${contBoxDivId}"</#if>>
<div class="panel-heading">
<#if boxHeader["@title"]?has_content><h5>${ec.getResource().expand(boxHeader["@title"]!"", "")}</h5></#if>
<#if boxHeader["@title"]?has_content><h5>${ec.getResource().expand(boxHeader["@title"]!"", "")?html}</h5></#if>
<#recurse boxHeader>
<#if .node["box-toolbar"]?has_content>
<div class="panel-toolbar">
Expand Down
2 changes: 1 addition & 1 deletion template/screen-macro/DefaultScreenMacros.vuet.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ${sri.renderSection(.node["@name"])}
<#assign boxHeader = .node["box-header"][0]!>
<#assign boxType = ec.resource.expand(.node["@type"], "")!>
<#if !boxType?has_content><#assign boxType = "default"></#if>
<container-box<#if contBoxDivId?has_content> id="${contBoxDivId}"</#if> type="${boxType}"<#if boxHeader??> title="${ec.getResource().expand(boxHeader["@title"]!"", "")}"</#if> :initial-open="<#if ec.getResource().expand(.node["@initial"]!, "") == "closed">false<#else>true</#if>">
<container-box<#if contBoxDivId?has_content> id="${contBoxDivId}"</#if> type="${boxType}"<#if boxHeader??> title="${ec.getResource().expand(boxHeader["@title"]!"", "")?html}"</#if> :initial-open="<#if ec.getResource().expand(.node["@initial"]!, "") == "closed">false<#else>true</#if>">
<#-- NOTE: direct use of the container-box component would not use template elements but rather use the 'slot' attribute directly on the child elements which we can't do here -->
<#if boxHeader??><template slot="header"><#recurse boxHeader></template></#if>
<#if .node["box-toolbar"]?has_content><template slot="toolbar"><#recurse .node["box-toolbar"][0]></template></#if>
Expand Down

0 comments on commit e5400ab

Please sign in to comment.