geo.php 706 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Validates geo (geographical coordinates) according to RFC 5870
  4. * @todo Filter allowed query parameters and their order
  5. */
  6. class HTMLPurifier_URIScheme_geo extends HTMLPurifier_URIScheme
  7. {
  8. /**
  9. * @type bool
  10. */
  11. public $browsable = false;
  12. /**
  13. * @type bool
  14. */
  15. public $may_omit_host = true;
  16. /**
  17. * @param HTMLPurifier_URI $uri
  18. * @param HTMLPurifier_Config $config
  19. * @param HTMLPurifier_Context $context
  20. * @return bool
  21. */
  22. public function doValidate(&$uri, $config, $context)
  23. {
  24. $uri->userinfo = null;
  25. $uri->host = null;
  26. $uri->port = null;
  27. return true;
  28. }
  29. }
  30. // vim: et sw=4 sts=4