Advertisement
ozh

slash in YOURLS charset

ozh
Feb 27th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. Plugin:
  2.  
  3. <?php
  4.  
  5. /*
  6. Plugin Name: 00 TEST SLASH
  7. Plugin URI:
  8. Description:
  9. Version: 1.0
  10. Author: Ozh
  11. Author URI: http://ozh.org/
  12. */
  13.  
  14. yourls_add_filter( 'get_shorturl_charset', 'ozh_slash_in_charset' );
  15. function ozh_slash_in_charset( $in ) {
  16.     return $in.'/';
  17. }
  18.  
  19. ?>
  20.  
  21. Test file :
  22.  
  23. <?php
  24.  
  25. var_dump( yourls_sanitize_keyword( 'omg/ozh;' ) );
  26. // string 'omg/ozh' (length=7)
  27.  
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement