Function __global->check_naughty_javascript_url
Definitions
sources/comcode_renderer.php
- Check the specified URL for potentially malicious JavaScript/etc. If any is found, the hack-attack is logged if in an active post request by the submitting member otherwise filtered out.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $source_member | MEMBER | No | No | required parameter | N/A | N/A | The member who submitted the URL |
| $url | URLPATH | No | No | required parameter | N/A | N/A | The URL to check |
| $as_admin | boolean | No | No | required parameter | N/A | N/A | Whether to check as arbitrary admin |
Returns
- Filtered input URL
- Type: URLPATH
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check the specified URL for potentially malicious JavaScript/etc. If any is found, the hack-attack is logged if in an active post request by the submitting member otherwise filtered out.
*
* @param MEMBER $source_member The member who submitted the URL
* @param URLPATH $url The URL to check
* @param boolean $as_admin Whether to check as arbitrary admin
* @return URLPATH Filtered input URL
*/
function check_naughty_javascript_url(int $source_member, string $url, bool $as_admin) : string
* Check the specified URL for potentially malicious JavaScript/etc. If any is found, the hack-attack is logged if in an active post request by the submitting member otherwise filtered out.
*
* @param MEMBER $source_member The member who submitted the URL
* @param URLPATH $url The URL to check
* @param boolean $as_admin Whether to check as arbitrary admin
* @return URLPATH Filtered input URL
*/
function check_naughty_javascript_url(int $source_member, string $url, bool $as_admin) : string

