11using System ;
22using System . Collections . Generic ;
33using System . Linq ;
4+ using System . Net ;
45using System . Text ;
5- using System . Web ;
66using TestStack . BDDfy . Configuration ;
77
88namespace TestStack . BDDfy . Reporters . Html
@@ -202,15 +202,15 @@ private void AddScenarioWithExamples(ReportModel.Scenario[] scenarioGroup)
202202 var firstScenario = scenarioGroup . First ( ) ;
203203 var scenarioResult = ( Result ) scenarioGroup . Max ( s => ( int ) s . Result ) ;
204204
205- AddLine ( string . Format ( "<div class='{0} canToggle scenarioTitle' data-toggle-target='{1}'>{2}{3}</div>" , scenarioResult , firstScenario . Id , HttpUtility . HtmlEncode ( firstScenario . Title ) , FormatTags ( firstScenario . Tags ) ) ) ;
205+ AddLine ( string . Format ( "<div class='{0} canToggle scenarioTitle' data-toggle-target='{1}'>{2}{3}</div>" , scenarioResult , firstScenario . Id , WebUtility . HtmlEncode ( firstScenario . Title ) , FormatTags ( firstScenario . Tags ) ) ) ;
206206
207207 using ( OpenTag ( string . Format ( "<ul class='steps' id='{0}'>" , firstScenario . Id ) , HtmlTag . ul ) )
208208 {
209209 foreach ( var step in firstScenario . Steps . Where ( s => s . ShouldReport ) )
210210 {
211211 using ( OpenTag ( string . Format ( "<li class='step {0}'>" , step . ExecutionOrder ) , HtmlTag . li ) )
212212 {
213- var titleLines = HttpUtility . HtmlEncode ( step . Title )
213+ var titleLines = WebUtility . HtmlEncode ( step . Title )
214214 . Split ( new [ ] { Environment . NewLine } , StringSplitOptions . None ) ;
215215 var title = titleLines [ 0 ] ;
216216
@@ -262,7 +262,7 @@ private void AddExampleRow(ReportModel.Scenario scenario, Result scenarioResult)
262262 {
263263 AddLine ( string . Format ( "<td><Span class='{0}' style='margin-right:4px;' /></td>" , scenario . Result ) ) ;
264264 foreach ( var exampleValue in scenario . Example . Values )
265- AddLine ( string . Format ( "<td>{0}</td>" , HttpUtility . HtmlEncode ( exampleValue . GetValueAsString ( ) ) ) ) ;
265+ AddLine ( string . Format ( "<td>{0}</td>" , WebUtility . HtmlEncode ( exampleValue . GetValueAsString ( ) ) ) ) ;
266266
267267 if ( scenarioResult != Result . Failed )
268268 return ;
@@ -275,7 +275,7 @@ private void AddExampleRow(ReportModel.Scenario scenario, Result scenarioResult)
275275 return ;
276276
277277 var exceptionId = Configurator . IdGenerator . GetStepId ( ) ;
278- var encodedExceptionMessage = HttpUtility . HtmlEncode ( failingStep . Exception . Message ) ;
278+ var encodedExceptionMessage = WebUtility . HtmlEncode ( failingStep . Exception . Message ) ;
279279 AddLine ( string . Format ( "<span class='canToggle' data-toggle-target='{0}'>{1}</span>" , exceptionId , encodedExceptionMessage ) ) ;
280280 using ( OpenTag ( string . Format ( "<div class='step FailedException' id='{0}'>" , exceptionId ) , HtmlTag . div ) )
281281 {
@@ -287,7 +287,7 @@ private void AddExampleRow(ReportModel.Scenario scenario, Result scenarioResult)
287287
288288 private void AddScenario ( ReportModel . Scenario scenario )
289289 {
290- AddLine ( string . Format ( "<div class='{0} canToggle scenarioTitle' data-toggle-target='{1}'>{2}{3}</div>" , scenario . Result , scenario . Id , HttpUtility . HtmlEncode ( scenario . Title ) , FormatTags ( scenario . Tags ) ) ) ;
290+ AddLine ( string . Format ( "<div class='{0} canToggle scenarioTitle' data-toggle-target='{1}'>{2}{3}</div>" , scenario . Result , scenario . Id , WebUtility . HtmlEncode ( scenario . Title ) , FormatTags ( scenario . Tags ) ) ) ;
291291
292292 using ( OpenTag ( string . Format ( "<ul class='steps' id='{0}'>" , scenario . Id ) , HtmlTag . ul ) )
293293 {
0 commit comments