burzum / cakephp-html-purifier

This is a CakePHP wrapper for the HTML Purifier lib. The plugin includes a trait, a view helper, a behavior and a shell to clean your markup wherever you like, in the view or in the model layer or clean any table and field using the shell.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Standalone inclusion fails on case-sensitive filesystems

combatpoodle opened this issue · comments

Error message is:

require_once(/var/www/marketplace/Plugin/HtmlPurifier/Vendor/Htmlpurifier-4.4.0-standalone/HTMLPurifier.standalone.php): failed to open stream: No such file or directory [APP/Plugin/HtmlPurifier/Config/bootstrap.php, line 5]

Direct filesystem access:

[vagrant@localhost ~]$ ls /var/www/marketplace/Plugin/HtmlPurifier/Vendor/Htmlpurifier-4.4.0-standalone/HTMLPurifier.standalone.php
ls: cannot access /var/www/marketplace/Plugin/HtmlPurifier/Vendor/Htmlpurifier-4.4.0-standalone/HTMLPurifier.standalone.php: No such file or directory
[vagrant@localhost ~]$ 

Working, with the H in Vendor/Htmlpurifier lowercase'd:

[vagrant@localhost ~]$ ls /var/www/marketplace/Plugin/HtmlPurifier/Vendor/htmlpurifier-4.4.0-standalone/HTMLPurifier.standalone.php
/var/www/marketplace/Plugin/HtmlPurifier/Vendor/htmlpurifier-4.4.0-standalone/HTMLPurifier.standalone.php
[vagrant@localhost ~]$ 

Seems to fix it:

diff --git a/Plugin/HtmlPurifier/Config/bootstrap.php b/Plugin/HtmlPurifier/Config/bootstrap.php
index fda0028..516f96f 100644
--- a/Plugin/HtmlPurifier/Config/bootstrap.php
+++ b/Plugin/HtmlPurifier/Config/bootstrap.php
@@ -2,6 +2,6 @@
 if (Configure::read('HtmlPurifier.standalone') != true) {
        require_once( CakePlugin::path('HtmlPurifier') . 'Vendor' . DS . 'HtmlPurifier' . DS . 'library' . DS . 'HTMLPur
 } else {
-       require_once( CakePlugin::path('HtmlPurifier') . 'Vendor' . DS . 'Htmlpurifier-4.4.0-standalone' . DS . 'HTMLPur
-}
+       require_once( CakePlugin::path('HtmlPurifier') . 'Vendor' . DS . 'htmlpurifier-4.4.0-standalone' . DS . 'HTMLPur
+ }
 App::uses('Purifier', 'HtmlPurifier.Lib');
\ No newline at end of file

Thanks!

Fixed in 852c035 thank you. You know that you can do pull requests instead of providing a diff as a paste here?

Great, thanks @burzum. Yeah, I got deadline'd. 🚦