Skip to content

Commit 932a921

Browse files
committed
Added escaped character replacement.
1 parent c232874 commit 932a921

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/GraphODataTemplateWriter/CodeHelpers/TypeScript/TypeHelperTypeScript.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ public static String UpperCaseFirstChar(this String s)
6262

6363
public static string GetSanitizedLongDescription(this OdcmProperty property)
6464
{
65-
return property.LongDescription ?? property.Description;
65+
var description = property.LongDescription ?? property.Description;
66+
if (description != null)
67+
{
68+
return description.Replace("<", "&lt;").Replace(">", "&gt;").Replace("&", "&amp;");
69+
}
70+
return null;
6671
}
6772
}
6873
}

0 commit comments

Comments
 (0)