Skip to content

Instantly share code, notes, and snippets.

@yhbyun
Created May 5, 2019 14:57
Show Gist options
  • Select an option

  • Save yhbyun/d44f2c119f979185f9c5b572626578c9 to your computer and use it in GitHub Desktop.

Select an option

Save yhbyun/d44f2c119f979185f9c5b572626578c9 to your computer and use it in GitHub Desktop.
// core/server/data/validation/index.js
validator.extend('isSlug', function isSlug(str) {
return validator.matches(str, /^[a-z0-9\-_ㄱ-ㅎㅏ-ㅣ가-힣]+$/);
});
// core/server/lib/security/string.js
// Remove non ascii characters
// string = unidecode(string);
// core/server/services/routing/controllers/entry.js
if (encodeURI(urlService.utils.absoluteToRelative(entry.url, {withoutSubdirectory: true})) !== req.path) {
bug('redirect');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment