[pLog-svn] r1983 - plugins/trunk/plogeshi
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Wed May 11 06:51:33 GMT 2005
Author: oscar
Date: 2005-05-11 06:51:32 +0000 (Wed, 11 May 2005)
New Revision: 1983
Modified:
plugins/trunk/plogeshi/pluginplogeshi.class.php
Log:
small improvement according to this: http://forums.plogworld.net/viewtopic.php?t=2383
Modified: plugins/trunk/plogeshi/pluginplogeshi.class.php
===================================================================
--- plugins/trunk/plogeshi/pluginplogeshi.class.php 2005-05-10 15:23:11 UTC (rev 1982)
+++ plugins/trunk/plogeshi/pluginplogeshi.class.php 2005-05-11 06:51:32 UTC (rev 1983)
@@ -89,12 +89,14 @@
// This code really should be looking at the text for the
// <code > tag
- $postText = trim($post);
- if($postText == "<br />" || $postText == "<br/>" ||
- $postText == "<p/>" || $postText == "<p />")
- return false;
- else
- return( strlen($postText) > 0 );
+ $postText = trim($post);
+
+ if ( !preg_match( "/<code\s+\w+\s*>/i", $post ) ||
+ !preg_match( "/<\/code>/", $post ) ) {
+ return false;
+ } else {
+ return( strlen($postText) > 0 );
+ }
}
/**
More information about the pLog-svn
mailing list