mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
c902d91c81
- This fits more closely, as this service is to so with rendering helpers and small parts - Whereas we want to use "rendering" for things concerned with rendering pages
12 lines
283 B
JavaScript
12 lines
283 B
JavaScript
// # Encode Helper
|
|
//
|
|
// Usage: `{{encode uri}}`
|
|
//
|
|
// Returns URI encoded string
|
|
|
|
const {SafeString} = require('../services/handlebars');
|
|
|
|
module.exports = function encode(string, options) {
|
|
const uri = string || options;
|
|
return new SafeString(encodeURIComponent(uri));
|
|
};
|