Comments (7)
Found it, I think, I just added *[style|class] to 'HTML.Allowed'
Seems to be working 👍
from purify.
I'm so glad you enjoy the package @nam-co! 😄
is there a way to change the config path?
You can do this by simply updating the purify.php
config to contain a config()
reference to another configuration file:
// config/purify.php
return [
// ...
'configs' => [
'default' => config('my-package.purify.config'),
],
];
I hope this answers your question!
from purify.
Hi there @nam-co,
Thanks for updating this issue with your resolution! That is the correct way to add those attributes to the allowed HTML.
Marking this as complete 👍
from purify.
Thanks @stevebauman , question: the package is so good Im planing on using it on all my projects, is there a way to change the config path? this way I can use a general purify config file that will be included with a general package I use in all my projects, just an idea
from purify.
Steve I tried this, but it comes out as null, but if I dd(config('my-package.purify.text')); it shows the array ok, any ideas?
Sorry about all this questions
'configs' => [
//default..
'text' => config('my-package.purify.text'),
'html' => config('my-package.purify.html')
]
from purify.
No worries @nam-co! I'm here to help 🙏
You're right -- you may have to set the configs at runtime. You can do so in your AppServiceProvider
.
Can you give this a shot?
// app/Providers/AppServiceProvider.php
public function boot()
{
config([
'purify.configs' => [
'text' => config('my-package.purify.text'),
'html' => config('my-package.purify.html'),
]
]);
}
from purify.
it worked thanks, since I bet you know a lot more than I do, I need to ask, will this make the load a ms slower? I ask because I do a lot of service provider on my package
from purify.
Related Issues (20)
- Problem table HOT 3
- oembed / CKeditor HOT 1
- Laravel 9 support HOT 5
- Booleans are nullified HOT 3
- Vapor / Other storage drivers Support HOT 7
- Definition with HTMLPurifier_HTMLDefinition not working HOT 5
- Laravel 10 support HOT 1
- Multiple configs? HOT 1
- CSS.AllowedProperties 'Left' doesn't work [Issue Created By Mistake]
- Cache.DefinitionImpl / Cache.SerializerPath is ignored HOT 7
- Image style attributes stripped HOT 1
- "A & B" turns it into "A & B" HOT 3
- Using purify with code/pre tags allowed crashes swoole worker processes HOT 3
- New definition of Trix editor HOT 2
- Call to undefined method Stevebauman\Purify\Purify::getPurifier() HOT 9
- unserialize(): Error at offset 2 of 6389 bytes when CACHE_DRIVER is database HOT 4
- HTML5 summary and details tags HOT 3
- Issue with Unserialization in CacheDefinitionCache after latest commit HOT 1
- Failure to write cache file - No such file or directory HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purify.