You are here

function _xbbcode_one_time_code in Extensible BBCode 5

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

File

./xbbcode-misc.php, line 67

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;
}