-
Notifications
You must be signed in to change notification settings - Fork 35
icms_core_HTMLFilter
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!
Class to Clean & Filter HTML for various uses.
Class uses external HTML Purifier for filtering.
- Class name: icms_core_HTMLFilter
- Namespace:
- Parent class: icms_core_DataFilter
public mixed $purifier
variable used by HTML Filter Library
- Visibility: public
public mixed $displaySmileys = array()
- Visibility: public
- This property is static.
public mixed $allSmileys = array()
- Visibility: public
- This property is static.
mixed icms_core_DataFilter::__construct()
- Visibility: public
- This method is defined by icms_core_DataFilter
object icms_core_HTMLFilter::getInstance()
Access the only instance of this class
- Visibility: public
- This method is static.
string icms_core_HTMLFilter::filterHTML(string html)
Gets the selected HTML Filter & filters the content
- Visibility: public
- This method is static.
- html string - <p>input to be cleaned</p>
mixed icms_core_HTMLFilter::getCustomFilterList()
- Visibility: private
- This method is static.
array icms_core_HTMLFilter::getHTMLFilterConfig()
Gets Custom Purifier configurations ** this function will improve in time **
- Visibility: protected
- This method is static.
mixed icms_core_DataFilter::filterDebugInfo(text, msg)
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text mixed
- msg mixed
string icms_core_DataFilter::_filterImgUrl(array matches)
Filters out invalid strings included in URL, if any
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- matches array
bool icms_core_DataFilter::checkUrlString(string text)
Checks if invalid strings are included in URL
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
string icms_core_DataFilter::nl2Br(string text)
Convert linebreaks to
tags
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
string icms_core_DataFilter::htmlSpecialChars(string text)
for displaying data in html textbox forms
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
string icms_core_DataFilter::undoHtmlSpecialChars(string text)
Reverses htmlSpecialChars
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
string|string[]|null icms_core_DataFilter::htmlEntities(string text)
Converts text string with HTML entities
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string - <p>Text to add HTML entities</p>
string icms_core_DataFilter::addSlashes(string text)
Note: magic_quotes_gpc and magic_quotes_runtime are deprecated as of PHP5.3.0
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
string icms_core_DataFilter::stripSlashesGPC(string text)
Note: magic_quotes_gpc and magic_quotes_runtime are deprecated as of PHP5.3.0 does that mean we can remove this function once 5.3 is minimum req? if magic_quotes_gpc is on, strip back slashes
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
array icms_core_DataFilter::cleanArray(mixed arr)
Filters Multidimensional Array Recursively removing keys with empty values
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- arr mixed
mixed icms_core_DataFilter::checkVar(data, type, options1, options2)
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- data mixed
- type mixed
- options1 mixed
- options2 mixed
array icms_core_DataFilter::checkVarArray(array input, array filters, bool strict)
Filter an array of variables, such as $_GET or $_POST, using a set of filters.
Any items in the input array not found in the filter array will be filtered as a string.
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- input array - <p>items to be filtered</p>
- filters array - <p>the keys of this array should match the keys in the input array and the values should be valid types for the checkVar method</p>
- strict bool - <p>when TRUE (default), items not in the filter array will be discarded when FALSE, items not in the filter array will be filtered as strings and included</p>
string icms_core_DataFilter::filterTextareaInput(string text)
Filters textarea form data for INPUt to DB (text only!!) For HTML please use icms_core_HTMLFilter::filterHTMLinput()
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
string icms_core_DataFilter::filterTextareaDisplay(string text, bool smiley, bool icode, bool image, bool br)
Filters textarea for DISPLAY purposes (text only!!) For HTML please use icms_core_HTMLFilter::filterHTMLdisplay()
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
- smiley bool - <p>allow smileys?</p>
- icode bool - <p>allow icmscode?</p>
- image bool - <p>allow inline images?</p>
- br bool - <p>convert linebreaks?</p>
string icms_core_DataFilter::filterHTMLinput(string html, bool smiley, bool icode, bool image, mixed br)
Filters HTML form data for INPUT to DB
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- html string
- smiley bool - <p>allow smileys?</p>
- icode bool - <p>allow icmscode?</p>
- image bool - <p>allow inline images?</p>
- br mixed
string icms_core_DataFilter::filterHTMLdisplay(string html, bool icode, mixed br)
Filters HTML form data for Display Only we don't really require the icmscode stuff, but we need to for content already in the DB before we start filtering on INPUT instead of OUTPUT!!
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- html string
- icode bool - <p>allow icmscode?</p>
- br mixed
string icms_core_DataFilter::codeDecode(string text, bool allowimage)
Replace icmsCodes with their equivalent HTML formatting
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
- allowimage bool - <p>Allow images in the text? On FALSE, uses links to images.</p>
string icms_core_DataFilter::makeClickable(string text)
Make links in the text clickable
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
mixed icms_core_DataFilter::smiley(message)
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- message mixed
mixed icms_core_DataFilter::getSmileys(mixed all)
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- all mixed
string icms_core_DataFilter::censorString(string text)
Replaces banned words in a string with their replacements
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string
mixed icms_core_DataFilter::codePreConv(mixed text, mixed imcode)
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text mixed
- imcode mixed
string icms_core_DataFilter::codeConv(string text, int imcode, int image)
Converts text to imcode
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string - <p>Text to convert</p>
- imcode int - <p>Is the code Xcode?</p>
- image int - <p>configuration for the purifier</p>
string icms_core_DataFilter::codeSanitizer(string str, string image)
Sanitizes decoded string
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- str string - <p>String to sanitize</p>
- image string - <p>Is the string an image</p>
string icms_core_DataFilter::codeDecode_extended(string text, int allowimage)
This function gets allowed plugins from DB and loads them in the sanitizer
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string - <p>Plugin name</p>
- allowimage int - <p>Allow image?</p>
bool icms_core_DataFilter::loadExtension(string name)
loads the textsanitizer plugins
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- name string - <p>Name of the extension to load</p>
string icms_core_DataFilter::executeExtension(string name, string text)
Executes file with a certain extension using call_user_func_array
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- name string - <p>Name of the file to load</p>
- text string - <p>Text to show if the function doesn't exist</p>
string icms_core_DataFilter::textsanitizer_syntaxhighlight(string text)
Syntaxhighlight the code
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string - <p>purifies (lightly) and then syntax highlights the text</p>
string icms_core_DataFilter::textsanitizer_php_highlight(string text)
Syntaxhighlight the code using PHP highlight
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string - <p>Text to highlight</p>
string icms_core_DataFilter::textsanitizer_geshi_highlight(string text)
Syntaxhighlight the code using Geshi highlight
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string - <p>The text to highlight</p>
string icms_core_DataFilter::icms_trim(string text)
Trims certain text
Replaces include/functions.php :: xoops_trim()
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- text string - <p>The Text to trim</p>
string icms_core_DataFilter::utf8_strrev(string str, string reverse)
Function to reverse given text with utf-8 character sets
credit for this function should goto lwc courtesy of php.net.
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- str string - <p>The text to be reversed.</p>
- reverse string - <p>TRUE will reverse everything including numbers, FALSE will reverse text only but numbers will be left intact. example: when TRUE: impresscms 2008 > 8002 smcsserpmi, FALSE: impresscms 2008 > 2008 smcsserpmi</p>
string icms_core_DataFilter::icms_substr(string str, int start, int length, string trimmarker)
Returns the portion of string specified by the start and length parameters.
If $trimmarker is supplied, it is appended to the return string. This function works fine with multi-byte characters if mb_* functions exist on the server.
Replaces legacy include/functions.php :: xoops_substr()
- Visibility: public
- This method is static.
- This method is defined by icms_core_DataFilter
- str string
- start int
- length int
- trimmarker string
mixed icms_core_DataFilter::priv_checkVar(mixed data, mixed type, mixed options1, mixed options2)
Private Function checks & Validates Data
- Visibility: private
- This method is static.
- This method is defined by icms_core_DataFilter
- data mixed
- type mixed
- options1 mixed
- options2 mixed
string icms_core_DataFilter::priv_smiley(string message)
Replace emoticons in the message with smiley images
- Visibility: private
- This method is static.
- This method is defined by icms_core_DataFilter
- message string
array icms_core_DataFilter::priv_getSmileys(bool all)
Get the smileys
- Visibility: private
- This method is static.
- This method is defined by icms_core_DataFilter
- all bool