Function __global->filter_html
Definitions
sources/comcode_compiler.php
- Filter HTML for safety.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $as_admin | boolean | No | No | required parameter | N/A | N/A | Whether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one. |
| $source_member | MEMBER | No | No | required parameter | N/A | N/A | The member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully |
| $pos | integer | No | No | required parameter | N/A | N/A | The offset of the tag in the Comcode |
| &$len | integer | Yes | No | required parameter | N/A | N/A | The length of the Comcode |
| &$comcode | LONG_TEXT | Yes | No | required parameter | N/A | N/A | The Comcode being parsed |
| $in_html | boolean | No | No | required parameter | N/A | N/A | Whether the parser is/was in an HTML region |
| $in_semihtml | boolean | No | No | required parameter | N/A | N/A | Whether the parser is/was in a Semi-HTML region |
Preview
Code (PHP)
/**
* Filter HTML for safety.
*
* @param boolean $as_admin Whether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
* @param MEMBER $source_member The member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully
* @param integer $pos The offset of the tag in the Comcode
* @param integer $len The length of the Comcode
* @param LONG_TEXT $comcode The Comcode being parsed
* @param boolean $in_html Whether the parser is/was in an HTML region
* @param boolean $in_semihtml Whether the parser is/was in a Semi-HTML region
*/
function filter_html(bool $as_admin, int $source_member, int $pos, int &$len, string &$comcode, bool $in_html, bool $in_semihtml)
* Filter HTML for safety.
*
* @param boolean $as_admin Whether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
* @param MEMBER $source_member The member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully
* @param integer $pos The offset of the tag in the Comcode
* @param integer $len The length of the Comcode
* @param LONG_TEXT $comcode The Comcode being parsed
* @param boolean $in_html Whether the parser is/was in an HTML region
* @param boolean $in_semihtml Whether the parser is/was in a Semi-HTML region
*/
function filter_html(bool $as_admin, int $source_member, int $pos, int &$len, string &$comcode, bool $in_html, bool $in_semihtml)

