Skip to content

Commit

Permalink
Allow raw html even if Feature.Html is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Oct 12, 2018
1 parent 703bf4c commit f107605
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ServiceStack/HttpResponseExtensionsInternal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ public static async Task<bool> WriteToResponse(this IResponse response, object r

//ContentType='text/html' is the default for a HttpResponse
//Do not override if another has been set
if (response.ContentType == null || response.ContentType == MimeTypes.Html)
if (response.ContentType == null || (response.ContentType == MimeTypes.Html
&& !(response.Dto is string))) //Allow HTML string even if Feature.Html is removed
{
response.ContentType = defaultContentType;
}
Expand Down

0 comments on commit f107605

Please sign in to comment.