File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
src/DotNetApiDiff/Reporting Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,21 @@ public string Format(ComparisonResult result)
6464 return _mainTemplate . Render ( context ) ;
6565 }
6666
67+ private static string HtmlEscape ( string ? input )
68+ {
69+ if ( string . IsNullOrEmpty ( input ) )
70+ {
71+ return input ?? string . Empty ;
72+ }
73+
74+ return input
75+ . Replace ( "&" , "&" )
76+ . Replace ( "<" , "<" )
77+ . Replace ( ">" , ">" )
78+ . Replace ( "\" " , """ )
79+ . Replace ( "'" , "'" ) ;
80+ }
81+
6782 private object PrepareConfigData ( ComparisonConfiguration config )
6883 {
6984 var namespaceMappings = config ? . Mappings ? . NamespaceMappings ?? new Dictionary < string , List < string > > ( ) ;
@@ -238,19 +253,6 @@ private object[] GroupChanges(List<ApiDifference> changes)
238253 } ) . ToArray ( ) ;
239254 }
240255
241- private static string HtmlEscape ( string ? input )
242- {
243- if ( string . IsNullOrEmpty ( input ) )
244- return input ?? string . Empty ;
245-
246- return input
247- . Replace ( "&" , "&" )
248- . Replace ( "<" , "<" )
249- . Replace ( ">" , ">" )
250- . Replace ( "\" " , """ )
251- . Replace ( "'" , "'" ) ;
252- }
253-
254256 private object [ ] PrepareBreakingChangesData ( IEnumerable < ApiDifference > breakingChanges )
255257 {
256258 return breakingChanges . OrderBy ( d => d . Severity )
You can’t perform that action at this time.
0 commit comments