Skip to content

Commit

Permalink
3522: fixing issues with report where scenario outlines contained quo…
Browse files Browse the repository at this point in the history
…tes or lt/gt tags in the title. Titles like "Test access to "<color>"" caused strange effects on the report (data-order attribute got unbound by the quotes, <color> was interpreted as HTML tag. (#3523)

Co-authored-by: t.eitzenberger <[email protected]>
  • Loading branch information
eitzenbe and t.eitzenberger authored Sep 4, 2024
1 parent e9c410d commit fef48e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,11 @@
<a href="${scenario.parentReport}">${scenario.parentName}</a>
</#if>
</td>
<td data-order="${scenario.title}">
<td data-order="<#outputformat 'HTML'>${scenario.title}</#outputformat>">
<#if (scenario.hasExamples() && scenario.getExampleOutcomes()?has_content)>
<i class="bi bi-table"
title="Data Driven Scenario"> <a
href="${scenario.scenarioReport}">${scenario.title}</a>
href="${scenario.scenarioReport}"><#outputformat 'HTML'>${scenario.title}</#outputformat></a>
<br/>
<#list scenario.getResultCounts() as resultCount>
<#assign outcome_icon = formatter.resultIcon().forResult(resultCount.result) />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@
</td>
<td>
<#if (scenario.hasExamples() && scenario.getExampleOutcomes()?has_content)>
<i class="bi bi-table" title="Data Driven Scenario"> <a href="${scenario.scenarioReport}">${scenario.title}</a>
<i class="bi bi-table" title="Data Driven Scenario"> <a href="${scenario.scenarioReport}"><#outputformat 'HTML'>${scenario.title}</#outputformat></a>
<br/>
<#list scenario.getResultCounts() as resultCount>
<#assign outcome_icon = formatter.resultIcon().forResult(resultCount.result) />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@ private String newLineUsedIn(String text) {

private static final CharSequenceTranslator ESCAPE_SPECIAL_CHARS = new AggregateTranslator(
new LookupTranslator(EntityArrays.ISO8859_1_ESCAPE()),
new LookupTranslator(EntityArrays.HTML40_EXTENDED_ESCAPE())
new LookupTranslator(EntityArrays.HTML40_EXTENDED_ESCAPE()),
new LookupTranslator(new String[][] { {"<", "&lt;"}, {">", "&gt;"}})
);

private final CharSequenceTranslator BASIC_XML = new AggregateTranslator(
Expand Down

0 comments on commit fef48e1

Please sign in to comment.