alexusmai / laravel-purifier Goto Github PK
View Code? Open in Web Editor NEWHTMLPurifier - Laravel 5 package
License: MIT License
HTMLPurifier - Laravel 5 package
License: MIT License
I am trying to clean but allow the style attribute..
Input
"<img class="img-fluid" src="/storage/uploads/abc.jpeg" alt="abc.jpeg" style="width: 25%;">\n"
Output
<p><img class="img-fluid" src="/storage/uploads/abc.jpeg" alt="abc.jpeg">\n
</p>
I've configured my settings as follows, including style within img[]
'HTML.Allowed' => 'div,b,strong,i,em,u,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src|class|style]',
When I remove class from the img[] section it will strip class, but having style included still results in it being stripped.
I'm running PHP 7.1
Thanks
Hello get this Package an update to run with Laravel 5.4? 👍
Hello,
at the moment, I can not update to Laravel 5.8, because of:
Problem 1
- Conclusion: remove alexusmai/laravel-purifier 0.5
- Conclusion: don't install laravel/framework v5.8.2
- Conclusion: don't install laravel/framework v5.8.1
- Installation request for alexusmai/laravel-purifier ^0.5.0 -> satisfiable by alexusmai/laravel-purifier[0.5].
- Conclusion: don't install laravel/framework v5.8.0
- alexusmai/laravel-purifier 0.5 requires illuminate/support 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.* -> satisfiable by laravel/framework[v5.7.27, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev], illuminate/support[5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9].
Would it be possible to get an update here? Thanks in advance :-)
Satisfied by my PR: #3
Laravel 5.4.11
PHP 7.1x64
use Alexusmai\LaravelPurifier\Purifier;
не работает:
Purifier::clean($text);
работает:
purifier($text);
и
$purifier = new Purifier;
$purifier->clean($text);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.