You are here

function _xbbcode_one_time_code in Extensible BBCode 6

Same name and namespace in other branches
  1. 5 xbbcode-misc.php \_xbbcode_one_time_code()
2 calls to _xbbcode_one_time_code()
XBBCodeFilter::process in ./xbbcode.filter.inc
_xbbcode_parse_args in ./xbbcode.inc

File

./xbbcode.inc, line 78

Code

function _xbbcode_one_time_code($text) {

  // find an internal delimiter that's guaranteed not to collide with our given text.
  do {
    $code = md5(rand(1000, 9999));
  } while (preg_match("/{$code}/", $text));
  return $code;
}