--- flashvideo.module	2009-05-02 04:28:01.000000000 +0200
+++ flashvideo.module	2009-06-17 05:30:09.000000000 +0200
@@ -2147,7 +2147,7 @@ function flashvideo_get_video_object($no
 function _flashvideo_parse_params($body, &$pos, $max_params = 10) {
 
   // If we are able to find the end tag delimiter denoted by "]"
-  if (($endpos = strpos($body, ']', $pos)) !== FALSE) {
+  if (($endpos = mb_strpos($body, ']', $pos)) !== FALSE) {
 
     // Set up an array of characters to take out from the parameter string.
     $bad_chars = array("<p>", "</p>", "<br>", "<br />", "\n", "\r", "\t", " ");
@@ -2162,7 +2162,7 @@ function _flashvideo_parse_params($body,
     $parts = explode(':', $param_string);
 
     // Set the position to the end position.
-    $pos = $endpos + 1;
+    $pos = strpos($body, ']', $pos) + 1;
 
     // Remove the first index (it's not a parameter).
     unset($parts[0]);
@@ -2229,13 +2229,15 @@ function _flashvideo_replace_tags(&$node
   $body = (isset($node->teaser) && $node->body == '') ? $node->teaser : $node->body;
 
   // Search for tags
-  for ($pos = 0; (($pos = $startpos = strpos($body, $tag, $pos)) !== FALSE); $pos++) {
+  for ($pos = 0, $lastpos = 0; (($pos = mb_strpos($body, $tag, $pos)) !== FALSE); $pos++) {
+
+    $startpos = strpos($body, $tag, $lastpos);
 
     // We need to check to see if this tag has "!" in front of it, if it does, then we will ignore this tag.
     if (drupal_substr($body, $pos - 1, 1) == '!') {
 
       // Replace the body with this with a normal "[video]" or "[thumbnail]"
-      $body = substr_replace($body, $tag, $pos - 1, drupal_strlen($tag) + 1);
+      $body = substr_replace($body, $tag, $startpos - 1, drupal_strlen($tag) + 1);
     }
 
     // This is the real thing.
@@ -2260,6 +2262,8 @@ function _flashvideo_replace_tags(&$node
     // If the position exceeds the body length, then break out of the loop.
     if ($pos >= drupal_strlen($body))
       break;
+
+    $lastpos = $pos;
   }
 
   // Set the teaser or the body dependent on which one is being shown.
