mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Switched to using safe string for navigation slug (#10267)
closes 10258 - we should use consistent tooling for generating slugs across the whole of Ghost
This commit is contained in:
parent
c2275ed131
commit
2860ddeb3b
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
// Outputs navigation menu of static urls
|
||||
|
||||
var proxy = require('./proxy'),
|
||||
string = require('../lib/security/string'),
|
||||
_ = require('lodash'),
|
||||
SafeString = proxy.SafeString,
|
||||
i18n = proxy.i18n,
|
||||
|
@ -41,7 +42,7 @@ module.exports = function navigation(options) {
|
|||
}
|
||||
|
||||
function _slugify(label) {
|
||||
return label.toLowerCase().replace(/[^\w ]+/g, '').replace(/ +/g, '-');
|
||||
return string.safe(label);
|
||||
}
|
||||
|
||||
// strips trailing slashes and compares urls
|
||||
|
|
Loading…
Add table
Reference in a new issue