RFC 1734: Should Includes helpers returning Html return HtmlStrings?

Details

Author: Caen De Silva (@caendesilva)
·

Abstract

We have this class, where we document that "Both Markdown and Blade includes will be rendered to HTML". Wouldn't it then make more sense if these returned HtmlString objects instead of string types?

/**
 * The Includes facade provides a simple way to access partials in the includes directory.
 *
 * Both Markdown and Blade includes will be rendered to HTML.
 */
class Includes

This is more semantic, but has the side effect that they will no longer be escaped.

Considering the usages though, I imagine that these are already being used within literal echo directives {!! !!}. It could be a breaking change, and it needs to be communicated clearly, so possibly something for v2.x?