oop.simple.api.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Parse($string = "")
  2. The basic function of kses. Give it a $string, and it will strip
  3. out the unwanted HTML and attributes.
  4. AddProtocols()
  5. Add a protocol or list of protocols to the kses object to be
  6. considered valid during a Parse(). The parameter can be a string
  7. containing a single protocol, or an array of strings, each
  8. containing a single protocol.
  9. Protocols()
  10. Deprecated. Use AddProtocols()
  11. AddProtocol($protocol = "")
  12. Adds a single protocol to the kses object that will be considered
  13. valid during a Parse().
  14. SetProtocols()
  15. This is a straight setting/overwrite of existing protocols in the
  16. kses object. All existing protocols are removed, and the parameter
  17. is used to determine what protocol(s) the kses object will consider
  18. valid. The parameter can be a string containing a single protocol,
  19. or an array of strings, each constaining a single protocol.
  20. DumpProtocols()
  21. This returns an indexed array of the valid protocols contained in
  22. the kses object.
  23. DumpElements()
  24. This returns an associative array of the valid (X)HTML elements in
  25. the kses object along with attributes for each element, and tests
  26. that will be performed on each attribute.
  27. AddHTML($tag = "", $attribs = array())
  28. This allows the end user to add a single (X)HTML element to the
  29. kses object along with the (if any) attributes that the specific
  30. (X)HTML element is allowed to have.
  31. See the file 'attribute-value-checks' for more information as to
  32. the format of the data to be provided to this method.
  33. RemoveProtocol($protocol = "")
  34. This allows for the removal of a single protocol from the list of
  35. valid protocols in the kses object.
  36. RemoveProtocols()
  37. This allows for the single or batch removal of protocols from the
  38. kses object. The parameter is either a string containing a
  39. protocol to be removed, or an array of strings that each contain
  40. a protocol.
  41. filterKsesTextHook($string)
  42. For the OOP version of kses, this is an additional hook that allows
  43. the end user to perform additional postprocessing of a string
  44. that's being run through Parse().
  45. _hook()
  46. Deprecated. Use filterKsesTextHook().