Opened 10 years ago

Closed 10 years ago

#934 closed defect (fixed)

SuperClean plugin returns just quotation when executed on localhost

Reported by: Mark Owned by: gogo
Priority: low Milestone: Version 1.0
Component: Plugin_SuperClean Version: trunk
Severity: normal Keywords: SuperClean, localhost
Cc:

Description

When running the SuperClean plugin from a localhost environment the editor content gets deleted and a quotation mark is inserted instead.

Change History (5)

comment:1 Changed 10 years ago by ray

The SuperClean tidy handler tries to call tidy locally before submitting the content to a remote server to do the tidying.

I suppose you have passthru() not disabled in your php.ini, and you have not installed tidy.

I propose this not very elegant fix

Index: tidy.php
===================================================================
--- tidy.php	(revision 713)
+++ tidy.php	(working copy)
@@ -115,7 +115,7 @@
       $content = ob_get_contents();
     ob_end_clean();
 
-    if(!strlen($content))
+    if(strlen($content) < 4)
     {
       // Tidy on the local machine failed, try a post
       $res_1

Any better ideas welcome, I have no experience with passthru() and such

comment:2 Changed 10 years ago by htanaka

note:

1.
if($is_windows){

passthru( ... " | tidy ... 2>nul");

}

2.
$is_safe_mode = ini_get("safe_mode");

comment:3 Changed 10 years ago by ray

  • Priority changed from high to low
  • Severity changed from major to normal

comment:4 Changed 10 years ago by ray

in rev [767] I applied the patch I proposed in my comment above, though I have the strong feeling that it could be done better...

comment:5 Changed 10 years ago by ray

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.