Comments (4)
I will try and solve this and submit a PR today.
from utils.
Sorry, I don't understand how the replacement is working. I was looking to use /[^\w]/
for anything which wasn't a word character, but it seems as though it uses hexadecimal escaped characters.
I'll use beforeSlugGeneration()
to do some changes 😸
from utils.
Honestly I haven right now no idea how to replace all and every not wanted character in a reliable way. The issue is if you make it to strict you might replace things you want. Especially given the fact that multi-byte slugs are valid, so you can't just say "accept only ASCII chars".
I think using the callback in this case is the right way to do it. I've updated the documentation on the callbacks and improved it a little by adding another callback. Please take a look at this commit, I've merged it already to develop
https://github.com/burzum/utils/commit/b03ab304398bbd39f5cc9c74a0c024543e4c7762.
from utils.
Looks good to me dude, thanks for the update.
from utils.
Related Issues (20)
- SoftDeleteBehavior : Model::deleteAll() HOT 4
- SoftDeleteBehavior : Update the associated model also HOT 2
- Referer Component - remeber referer on error HOT 2
- SoftDeleteBehavior: support only one deleted date field HOT 3
- Test failing HOT 1
- Soft Deletable doesn't work recursively HOT 2
- geting this error when using csvImporter HOT 1
- SluggableBehavior: non-alpha-numeric label results in empty slug HOT 4
- potential cacheQueries and SoftDeleteBehavior bug in SluggableBehavior HOT 4
- SluggableBehavior - Proper way to save in a loop HOT 2
- potential bug when using both SoftDeleteBehavior and SluggableBehavior HOT 2
- SoftDelete deleting records ("hard delete") HOT 3
- SerializeableBehavior afterFind() not working and no test case present
- PublishableBehavior afterFind proposal HOT 1
- SoftDeleteBehavior & Unit Testing = Error: Table users for model User was not found in datasource test. HOT 10
- Soft delete does not support atomic option on CakePHP 2.6+ HOT 2
- ListBehavior when creating a new item HOT 2
- SoftDelete Behavior broken for relationships if alias is different from className HOT 1
- ToggleableBehavior for 3.x 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 utils.