You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

URIHarness.php 844B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. class HTMLPurifier_URIHarness extends HTMLPurifier_Harness
  3. {
  4. /**
  5. * Prepares two URIs into object form
  6. * @param &$uri Reference to string input URI
  7. * @param &$expect_uri Reference to string expectation URI
  8. * @note If $expect_uri is false, it will stay false
  9. */
  10. protected function prepareURI(&$uri, &$expect_uri)
  11. {
  12. $parser = new HTMLPurifier_URIParser();
  13. if ($expect_uri === true) $expect_uri = $uri;
  14. $uri = $parser->parse($uri);
  15. if ($expect_uri !== false) {
  16. $expect_uri = $parser->parse($expect_uri);
  17. }
  18. }
  19. /**
  20. * Generates a URI object from the corresponding string
  21. */
  22. protected function createURI($uri)
  23. {
  24. $parser = new HTMLPurifier_URIParser();
  25. return $parser->parse($uri);
  26. }
  27. }
  28. // vim: et sw=4 sts=4