SproutCMS

This is the code documentation for the SproutCMS project

function html()

Encoding for HTML
Existing HTML entities in a string will be double-encoded

Usage

string Enc::html ( string $value );

Example

$bad_html = Enc::html('A & B'); // don't do this; returns A & B

Example

$html = Enc::html('A & B'); // returns A & B

Arguments

  1. string $value
    The text to encode. This should be plain (i.e. non-HTML) text

Return value

  • string