Code Monkey home page Code Monkey logo

Comments (9)

core45 avatar core45 commented on June 3, 2024 2

You are right. I didn't publish the config file.
After publishing it all is good.
Thank you!

from purify.

stevebauman avatar stevebauman commented on June 3, 2024 1

I cant seem to find anything about "publish the config file"? any reference where I can look into, i have the same error.

@nielslucas It's literally the second installation step in the readme:

To install Purify, run the following in the root of your project:

composer require stevebauman/purify

Then, publish the configuration file using:

php artisan vendor:publish --provider="Stevebauman\Purify\PurifyServiceProvider"

HTMLPurifier requires a cache path, and will default to its own folder inside the vendor directory if you do not publish the configuration file.

Same error... the config file is published

Clear your configuration cache.

from purify.

stevebauman avatar stevebauman commented on June 3, 2024 1

I didn't want to give chmod rights to the vendor folder so I was forced to look for other packages.

This was just fixed in v3.0.1.

from purify.

stevebauman avatar stevebauman commented on June 3, 2024

Hi @core45,

Did you publish the config file? The serializer path is already set to your applications storage path:

'Cache.SerializerPath' => storage_path('purify'),

I looked into the issue you mentioned, and that package does the same thing:

https://github.com/passbolt/passbolt_api/blob/36a4b4177b72a0cdef1406f8f6b99c10b4aafd1e/src/Utility/Purifier.php#L26-L32

from purify.

alpharameeztech avatar alpharameeztech commented on June 3, 2024

Even without publish the config file, it should suppose to work uninterrupted.

from purify.

nielslucas avatar nielslucas commented on June 3, 2024

I cant seem to find anything about "publish the config file"? any reference where I can look into, i have the same error.

from purify.

pmochine avatar pmochine commented on June 3, 2024

Same error... the config file is published

from purify.

stevebauman avatar stevebauman commented on June 3, 2024

@alpharameeztech

Even without publish the config file, it should suppose to work uninterrupted.

Since this is a sanitation library, I do not want to merge the configuration with the default built-in configuration, as this may include settings that the developer does not want in their purified text. This could cause major issues for people and they may wonder why some attributes are being removed / included.

All developers must publish the configuration file to define explicitly what they want to be filtered and kept in the purified HTML.

from purify.

pmochine avatar pmochine commented on June 3, 2024

@stevebauman hey thanks for the responses to the others. I don't understand why it didn't work for me. I have a staging site on a vps, but when I started to deploy my page I found out that I had the same bug as in the comments.

I didn't want to give chmod rights to the vendor folder so I was forced to look for other packages. This one had the same issue mewebstudio/Purifier#27, and fixed it somehow. So with this package from the mewerbstudio, I don't have any issues at all and don't have to do anything. It worked out of the box, even though I prefer your package for the simpler settings much more...

And for the staging site, I'm using a zero deployment tool where all caches are cleared etc.

from purify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.