File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ function generateReport(options) {
334334 ] ) ;
335335 } else if ( embedding . mime_type === 'text/plain' || ( embedding . media && embedding . media . type === 'text/plain' ) ) {
336336 step . text = ( step . text ? step . text : [ ] ) . concat ( [
337- _isBase64 ( embedding . data ) ? Base64 . decode ( embedding . data ) :
337+ _isBase64 ( embedding . data ) ? _escapeHtml ( Base64 . decode ( embedding . data ) ) :
338338 embedding . data
339339 ] ) ;
340340 } else if ( embedding . mime_type === 'image/png' || ( embedding . media && embedding . media . type === 'image/png' ) ) {
@@ -435,6 +435,16 @@ function generateReport(options) {
435435 ( firstPaddingChar === stringLength - 2 && string [ stringLength - 1 ] === '=' ) ;
436436 }
437437
438+ /**
439+ * Escape html in string
440+ * @param string
441+ * @return {string }
442+ * @private
443+ */
444+ function _escapeHtml ( string ) {
445+ return string . replace ( / < / g, '<' ) . replace ( / > / g, '>' )
446+ }
447+
438448 /**
439449 * Generate the features overview
440450 * @param {object } suite JSON object with all the features and scenarios
Original file line number Diff line number Diff line change 159159 <% } %>
160160
161161 <% if (step.image) { %>
162- <a href="#info<%= scenarioIndex %><%= stepIndex %>-image" data-toggle="collapse">Screenshot + </a>
162+ <a href="#info<%= scenarioIndex %><%= stepIndex %>-image" data-toggle="collapse">+ Screenshot </a>
163163 <% } %>
164164
165165 <% if (!_.isEmpty(step.attachments)) { %>
You can’t perform that action at this time.
0 commit comments