CRM_Utils_API_HTMLInputCoder
class CRM_Utils_API_HTMLInputCoder extends CRM_Utils_API_AbstractFieldCoder
This class captures the encoding practices of CRM-5667 in a reusable fashion. In this design, all submitted values are partially HTML-encoded before saving to the database. If a DB reader needs to output in non-HTML medium, then it should undo the partial HTML encoding.
This class should be short-lived -- 4.3 should introduce an alternative escaping scheme and consequently remove HTMLInputCoder.
Methods
Get skipped fields.
going to filter the submitted values across XSS vulnerability.
No description
No description
No description
No description
Perform in-place decode on strings (in a list of records).
Perform in-place encode on strings (in a single record).
No description
Perform in-place decode on strings (in a list of records).
Perform in-place decode on strings (in a single record).
Details
at line 64
array
getSkipFields()
Get skipped fields.
in CRM_Utils_API_AbstractFieldCoder at line 61
bool
isSkippedField(string $fldName)
Is field skipped.
at line 142
encodeInput(array|string $values, bool $castToString = FALSE)
going to filter the submitted values across XSS vulnerability.
at line 189
mixed
decodeOutput(string $values, bool $castToString = FALSE)
in CRM_Utils_API_AbstractFieldCoder at line 109
array
fromApiInput(array $apiRequest)
in CRM_Utils_API_AbstractFieldCoder at line 134
array
toApiOutput(array $apiRequest, array $result)
in CRM_Utils_API_AbstractFieldCoder at line 154
protected bool
isApiControlField($key)
at line 51
static CRM_Utils_API_HTMLInputCoder
singleton()
at line 153
encodeValue($value)
at line 164
encodeRows(array $rows)
Perform in-place decode on strings (in a list of records).
at line 177
encodeRow(array $row)
Perform in-place encode on strings (in a single record).
at line 200
decodeValue($value)
at line 211
decodeRows(array $rows)
Perform in-place decode on strings (in a list of records).
at line 224
decodeRow(array $row)
Perform in-place decode on strings (in a single record).