Index: editors/yui.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/yui.inc,v
retrieving revision 1.1
diff -u -r1.1 yui.inc
--- editors/yui.inc	8 Dec 2008 18:58:10 -0000	1.1
+++ editors/yui.inc	3 Mar 2009 21:53:08 -0000
@@ -62,15 +62,17 @@
  *   The installed editor version.
  */
 function wysiwyg_yui_version($editor) {
-  $script = wysiwyg_get_path('yui') . '/README';
-  $script = fopen($script, 'r');
-  fgets($script);
-  fgets($script);
-  $line = fgets($script);
-  if (preg_match('@([0-9\.]+)@', $line, $version)) {
-    fclose($script);
-    return $version[1];
+  $library = $editor['library path'] . '/editor/editor.js';
+  $library = fopen($library, 'r');
+  $max_lines = 10;
+  while ($max_lines && $line = fgets($library, 60)) {
+    if (preg_match('@version:\s([0-9\.]+)$@', $line, $version)) {
+      fclose($library);
+      return $version[1];
+    }
+    $max_lines--;
   }
+  fclose($library);
 }
 
 /**
