SproutCMS

This is the code documentation for the SproutCMS project

function encodeAttributeValue()

Encodes the value of an attribute using the correct encoding based on type

Usage

string|bool $RichTextSanitiser->encodeAttributeValue ( int $type , string $value );

Arguments

  1. int $type
    The attribute type code, e.g. ATTR_TYPE_URL
  2. string $value
    The attribute value as seen in the DOM

Return value

  • string
    A safely encoded attribute value or false if the value fails the checks
  • bool
    A safely encoded attribute value or false if the value fails the checks