mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
d989d62c10
refs #9589 * updated encode helper to use newer code standards * updated facebook_url helper to use newer code standards * updated foreach helper to use newer code standards
12 lines
268 B
JavaScript
12 lines
268 B
JavaScript
// # Encode Helper
|
|
//
|
|
// Usage: `{{encode uri}}`
|
|
//
|
|
// Returns URI encoded string
|
|
|
|
const {SafeString} = require('./proxy');
|
|
|
|
module.exports = function encode(string, options) {
|
|
const uri = string || options;
|
|
return new SafeString(encodeURIComponent(uri));
|
|
};
|