Skip to content

Commit

Permalink
Remove \n in strings to prevent multi line strings in generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Sep 29, 2015
1 parent 31f2d54 commit 1617923
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ServiceStack/NativeTypes/NativeTypesMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ public static string SafeValue(this string value)

public static string QuotedSafeValue(this string value)
{
value = value.Replace("\r", "").Replace("\n", "");
return "\"{0}\"".Fmt(value.SafeValue());
}

Expand Down
3 changes: 2 additions & 1 deletion tests/Check.ServiceModel/CodeGenTestTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public class RestrictedAttributes

[DataContract]
[Route("/allowed-attributes","GET")]
[Api("AllowedAttributes Description")]
[Api(@"AllowedAttributes
Description")]
[ApiResponse(HttpStatusCode.BadRequest, "Your request was not understood")]
[Description("Description on AllowedAttributes")]
public class AllowedAttributes
Expand Down

0 comments on commit 1617923

Please sign in to comment.